Alex,
Thanks for the help, I added your code but it is not working properly.
I can see that it somewhat erases the lines but many are still drawn
just opaquely. Does that make sense? I pretty much just added your
code.
Cole Harris
Enterasys Networks
Phone: 978-684-1652
Email: coharris@enterasys.com
www. http://www.enterasys.com
···
-----Original Message-----
From: Alex Tweedly [mailto:alex@tweedly.net]
Sent: Thursday, September 01, 2005 2:44 PM
To: wxPython-users@lists.wxwidgets.org
Subject: Re: [wxPython-users] draw a line to cursor
Harris, Cole wrote:
Hi all,
I am trying to do a relatively easy task... Draw a line from a static
spot on the canvas to my cursor and have it follow the cursor wherever
it goes. I was able to do this by using the wxDC function DrawLine()
and a redraw it everytime the event OnMotion is called. The problem
arises when I draw it I must Refresh() everytime in order to eliminate
the old line from the canvas. This causes a very sluggish motion and
redrawing. Is there any faster way to do this or possibly a built in
wrapper that I am not aware of?
Thanks-Cole
Draw it using a "reversible" function, then undraw it before drawing the
next one.
e.g. wxDC.SetLogicalFunction (wxINVERT)
Then when you "undraw" it (i.e. draw it the second time) you reverse the
original effect.
.
--
Alex Tweedly http://www.tweedly.net
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.10.18/86 - Release Date:
31/08/2005
---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org