[wxPython-users] Newbie seeks direction
Christopher Barker
Chris.Barker at noaa.gov
Thu Aug 3 10:48:25 PDT 2006
Kent Tenney wrote:
> * draw a shape over an image and retrieve the corner coordinates
> of that shape.
> At this point I took code from
> http://murl.se/11111
> and listing 8.2 from the book, "A simple frame subclass"
>
> Is this a reasonable starting point?
That's specifically addressing putting an image behind other widgets,
which isn't really what you need, but the basic techniques are there.
Take a look at the Wiki, in:
http://wiki.wxpython.org/index.cgi/RecipesImagesAndGraphics
http://wiki.wxpython.org/index.cgi/WorkingWithImages
http://wiki.wxpython.org/index.cgi/DoubleBufferedDrawing
> Any suggestions as to how to implement drawing shape
> outlines over the image?
You could also use wx.lib.floatcanvas
It's designed to be a vector tool primarily, but it does support images,
and if you use the pixel coords of the image as your coordinates, it
will let you zoom and pan around the image, and give you the pixel
coords of your mouse actions even when zoomed in or out.
I've got an updated version, and bunch of extra examples that will help
you out, if ask me, I'll send it to you directly -- it's too big for
this list.
-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 at noaa.gov
More information about the wxpython-users
mailing list