[wxpython-users] What's going on with wx.Pen()?

Christopher Barker Chris.Barker at noaa.gov
Thu May 8 14:48:46 PDT 2008



Marlin Rowley wrote:
> the pen to be bright red.  And I want it to be that way ALL the time!  
> For some reason, when I change the background color of my brush to 
> something OTHER than black, I get a different color.  Why?

       dc.SetLogicalFunction(wx.XOR)


means that colors are bitwise XOR'd with the background color. It looks 
like you may have borrowed this from my (or someone else's) rubber band 
box code. It's there so that you can draw a visible line over any other 
color. If you always draw red, you won't be able to see it if the 
background is red.

However, if you do want that, get rid of that line.

-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

Chris.Barker at noaa.gov


More information about the wxpython-users mailing list