Gerber, HR, Mnr <[EMAIL PROTECTED]> wrote: > Currently there is a problem with the GC in that it is really very > slow (floatcanvas is much faster), this makes GC unusable for > projects that draw more than a couple hundred components.
As Bill mentioned, GDI+ and Cairo are relatively slow compared to the older technology. (On Mac CoreGraphics is now what is being used under the covers for both DCs and GCs, so they should be about the same there.) Cairo at least is still improving though, and newer versions of GTK now use it for all drawing. > GC is still > very new and will improve with time. I currently know too little > about the inner workings of GC to know if the performance decrease is > because of my possibly inefficient usage. :) You can optimize things like pens and brushes by creating, using and saving the Graphics version of the object (wx.GraphicsBrush, wx.GraphicsPen, etc.) instead of the old DC version (wx.Brush, wx.Pen, etc.) That way the GC doesn't have to convert it each time you use it. You can also save and reuse the paths and matrixes and other GraphicsObjects as needed. You are right though that there will probably be other things that improve over time as Stefan gets better ideas of typical use cases. BTW, you may want to look at wx.lib.docview and wx.lib.pydocview for existing classes for a command-stack and undo/redo frameworks, as well as the Document/View framework. -- Robin Dunn Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython! _______________________________________________ FloatCanvas mailing list [email protected] http://mail.mithis.com/cgi-bin/mailman/listinfo/floatcanvas
