[pyGEF-develop] Hello!
Status: Pre-Alpha
Brought to you by:
hrgerber
|
From: <pyg...@li...> - 2007-07-18 21:40:52
|
Hi Retief, Bill, and ???, I figured it was time to keep an eye on what you've been up to, it certainly looks like some good stuff, so I've joined the list. I scanned through the mailing list a bit, and have a few thoughts to share: On hit testing code: If you want to capture the mouse-leave and mouse-enter events, then hit testing has to be fast it has to be done for every motion event -- which is a lot! bb wrote: > building a hierarchy on the > document bounding boxes so you avoid having to do lots of transforms into > individual object coordinates is probably the better way to go. That'll > give O(lg N) performance in hit testing, whereas improving individual hit > tests will still give you something that's O(N). Are you talking about some sort of spatial index? If so, that would be great, and you might want to check out rtree. I've had it in mind for FloatCanvas for a while: http://zcologia.com/news/433/rtree-0-1-0/ It works with bounding boxes, and can quickly respond to the question: what BBs is this point in? and what BBs intersect this BB? Another note: It sounds like you're defining hitting as a hit within the Bounding Box of the object, which is really not that good -- there are times when you really want the hit to be a hit on the object itself -- or have I missed something? Retief wrote: > A developer's specific > application using pyGEF could replace Plotter with any implementation > of their choice, as long as it supplies the minimum functionality > required by the rest of the framework. I've always been pretty skeptical of "backend-independent" systems. You're kind of stuck with the lowest common denominator. As it is, GraphicsContext is a backend independent wrapper, as is Cairo (though at least Cairo does it's own in-memory bitmap rendering). Actually, Cairo has a lot going for it -- it's powerful, flexible, under active development, and is being used by Major projects (GTK and Mozilla). It also gives you other output options: PDF, Postscript, Printer? I understand Agg is faster - I wish Cairo used Agg as it's in-memory renderer, but as it started with that part, it probably never will, and at this point, I don't know that Agg really is any better than Cairo. And performance improvements will come. I wonder if it would be possible to use the Xara engine some how (GPL).... http://www.xaraxtreme.org/ Oh, and about using FloatCanvas as a back-end -- it seems it overlaps so much with pyGEF, that there really wouldn't be much point. Indeed, I'm here to see if it's time to drop FloatCanvas and move the pyGEF! I'm very interested to see where this all leads... -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chr...@no... |