Christian Blouin wrote:
To be general, swapping axis may be left up to the user to deal with rather
than to the baseclass to handle.
Well, yes and no. The natural axis for drawing to the screen (or bitmap) is Y positive down. The natural axis for almost everything I do is y positive up. That translation is one of the reasons I started writing FloatCanvas.
> it is refreshing to have a canvas which uses
> as world coordinate the same coordinates as the rest of the program!
And that is the other.
I would like to support either axis orientation, if I can figure out how to do it easily.
I've thought about this a bit more, and the problem is that with Text and Bitmap objects, I've added the convenience of assigning a position to locate the object, with regards to the (x,y) point you assign it. this position is based on top vs. bottom and left vs. right. The problem is that sometimes "top" means +y and sometimes it means -y.
maybe I need to add an extra flag tot he position argument, indicating if +y is up or down, but this feels a bit kludgey.
In my case, I have subclassed the
floatcanvas and am overiding many of the functions already (mostly to handle
new GUImodes).
When you've got it working, let me know, I may want to include them.
I'm still a bit surprised you want y+ down -- if you're working with maps, they are usually in lat, long, or northing-easting, both of which are Y+ up.
Thanks for your feedback,
-Chris
ยทยทยท
--
Christopher Barker, Ph.D.
Oceanographer
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chris.Barker@noaa.gov