Discussion:
Proper way to draw (and move) a line on top of an image
matt rosenthal
2014-10-08 19:08:12 UTC
Permalink
Hi,

Can someone point me in the right direction on how to create the following:
I have a UI with 2 main elements. A graph(Y axis = data, X axis =
distance). The second element is a picture that changes. I want the picture
to represent a specific point in the graph. so when I click the graph it
loads the correct picture. I have all this working but I want to be able to
draw a black line on the graph where the user clicked

Then if they click again I want to erase that line and put a new line where
they clicked again

My graph is a png. I have everthing working well except the black line

what is the proper type of UI element I should use for the graph so that I
can draw the black line on top of the graph?

Any other help is much appreciated.

Thanks...
--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wxpython-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Josh English
2014-10-09 04:45:51 UTC
Permalink
If you can draw the PNG on the screen, you should look into the
PaintDC and the EVT_PAINT event handler.

Josh, wxPython kibbitzer

On Wed, Oct 8, 2014 at 12:08 PM, matt rosenthal
Hi,
I have a UI with 2 main elements. A graph(Y axis = data, X axis = distance).
The second element is a picture that changes. I want the picture to
represent a specific point in the graph. so when I click the graph it loads
the correct picture. I have all this working but I want to be able to draw a
black line on the graph where the user clicked
Then if they click again I want to erase that line and put a new line where
they clicked again
My graph is a png. I have everthing working well except the black line
what is the proper type of UI element I should use for the graph so that I
can draw the black line on top of the graph?
Any other help is much appreciated.
Thanks...
--
You received this message because you are subscribed to the Google Groups
"wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.
--
Josh English
***@gmail.com
http://www.joshuarenglish.com
--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wxpython-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...