[pygtk] Canvas Design Principle
manavan.j at gmail.com
Sat Jun 20 03:09:54 WST 2009
I am wondering how a 2D canvas would be implemented. I think of the
following steps as its core design.
1. For all the objects to be displayed create a Spatial Index
2. At the time of display, iterate through all shapes that overlap the
view area and zoom
3. Display these in the drawing area after appropriate transformation.
Please advice if there is a better way that is adopted. If this is the usual
technique, which kind of Spatial index is usually used for a zoomable canvas
I googled for this with different key words. Though there are many canvas
implementations available to download, I could not find any writings on the
subject. Please point me if there is one you know.
Thanks in advance.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the pygtk