On Tue, 2008-03-04 at 08:26 +0000, Jamie Bullock wrote:

> OTOH:
> 
> - GC _does_ incur a performance hit, and it would be nice to have the
> option of using DC in performance critical situations. For example in my
> Braun software (http://sourceforge.net/projects/braun), I have recently
> added the option of using anti-aliased lines. Using them increases load
> by ~30%. Anti-aliasing is enabled by default, but setting a flag in a
> config file turns it off it your computer can't cope.
> 
> - If we work on supporting DC and GC, it will force us to provide an
> architecture that supports multiple backends, and therefore make it
> easier to add additional backends (SVG) in the future. (... or at least
> that's the theory... ;-)

Actually, the more I think about it, the more I think that this should
be an option set in DrawObject. This could give per-instance backend
selection, which would be quite powerful. The _Draw() method could be
assigned by __init__:

class DrawObject:
        def __init__(self,..., BackEnd = "GC"):
                ...
                self._Draw = eval(self.__draw_ + BackEnd)
                ...

        def __draw_GC(self,...):
                ...
        
        def __draw_DC(self,...):

etc.

Jamie

-- 
www.postlude.co.uk

_______________________________________________
FloatCanvas mailing list
[email protected]
http://mail.mithis.com/cgi-bin/mailman/listinfo/floatcanvas

Reply via email to