Chris Wrote a small demo using GraphicsContext.
The demo allows panning (Left mouse button Drag) and zooming in (Right mouse
button).
The demo supports very basic Layers and LayerManager.
I saw you asked about speed comparison with GC and wx.MemoryDC. In my demo I
first paint to a MemoryDC using the GC and then Blit to Bitmap. Similar to how
fc works. Any better way of doing this with GC?
I do get some peculiar behavior when trying to apply the Transformation matrix
for drawobjects. But when using Translate and Rotate (which I calculate from
the Transformation matrix) everything is fine???? The Transformation matrix
really simplifies Moving and Rotating.
The Transform matrix (1,0,0,1,0,0) nicely converts from screen to world
co-ordinates, and simply multiply the matrix be the zoom factor and everything
is draw correctly. Except text which is mirrored and upside down, but is what
the transformation matrix should do to text. So some other way of handling text
should be found. Or a screen co-ordinate system should be used. :(
The demo is currently drawing about 360 (60x [Polygon, Circle, Rectangle,
RoundedRegtangle, Line, Text]) objects which takes about 2.4 secs to draw. Is
this slow compared to fc? Any ideas to speed it up.
I don't have that much low level graphics experience. The reason I enjoy fc so
much, as I do not have to think about the low level stuff.
Notes on Layers and Layermanager (please comment). Each layer should be draw to
its own bitmap. Only layers that are dirty then gets redrawn. All the bitmaps
can then be Blited together (can this be done).
Questions about panning. How can one get the panning to only Draw the parts
that was not shown before the pan operation started? Or only show the part that
was visible when the operation started (this is probably the best option)?
Regards
Retief
Retief Gerber
Lektor
Lecturer
Departement Elektriese en Elektroniese Ingenieurswese
Department of Electrical and Electronic Engineering
Tel: +27 21 808 4011 I Faks/Fax: +27 21 808 4981
E-pos/E-mail: [EMAIL PROTECTED]
Universiteit Stellenbosch University
Privaat Sak/Private Bag X1 Matieland 7602
Suid-Afrika/South Africa
www.eng.sun.ac.za
pyGEFDemo.py
Description: pyGEFDemo.py
_______________________________________________ FloatCanvas mailing list [email protected] http://mail.mithis.com/cgi-bin/mailman/listinfo/floatcanvas
