Christopher Barker wrote: > 3) We need to decide how to do it -- it would be nice to allow both ways > - simple objects drawn with DCs (for performance and backward > compatibility), and GraphicsContext used where required. In theory, this > should be possible, as all the drawing is done to wx.Bitmap, and so you > should be able to draw parts of it with a DC, and parts with a GC, but > it may require some backward-incompatible changes. The way it's written > now, every DrawObject has a _draw() method that takes a DC and draws to > it. If we pass in a GC instead, all the draw() methods will need to be > rewritten. > > Another option is to pass in the wx.Bitmap to each object instead, and > have each object create either a Memory DC or GraphicsContext as it > needs, but I'm a bit concerned about the overhead re-creating the DC or > GC for every object.
A compromise would be to still pass the DC to the _draw methods, and let each draw method decide whether to create a GC using the DC as the target. That would probably still be more overhead than you want however. -- 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
