[wxPython] XOR'ing a line

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[wxPython] XOR'ing a line

Bob Klimek-2
Hello All,

Does anybody know how to xor a line? What I'm trying to do is draw a
line on a panel and then move the line by left-dragging with a mouse. I
do not see anything in wxPaintDC class that would allow me to do that,
short of repainting the whole panel.

Bob

--
---------------------
Robert B. Klimek
NASA Glenn Research Center
[hidden email]
---------------------

_______________________________________________
wxPython-users maillist  -  [hidden email]
http://starship.python.net/mailman/listinfo/wxpython-users



Reply | Threaded
Open this post in threaded view
|

Re: [wxPython] XOR'ing a line

Robin Dunn
> Hello All,
>
> Does anybody know how to xor a line? What I'm trying to do is draw a
> line on a panel and then move the line by left-dragging with a mouse. I
> do not see anything in wxPaintDC class that would allow me to do that,
> short of repainting the whole panel.
>

wxDC.SetLogicalFunction(wxINVERT)  # or is it wxXOR?  I never remember...

All drawing functions after this call will be drawn with the given logical
function.  Although wxXOR is available, I think what you want is wxINVERT.
Because of some different interpretations of the logical functions on the
various platforms you'll want to use wxINVERT to get the redraw-erases
functionality on all ports.


--
Robin Dunn
Software Craftsman
[hidden email]
http://AllDunn.com/robin/
http://AllDunn.com/wxPython/  Check it out!



_______________________________________________
wxPython-users maillist  -  [hidden email]
http://starship.python.net/mailman/listinfo/wxpython-users