comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: vertical line that moves with cursor in draw widget
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: vertical line that moves with cursor in draw widget [message #60727 is a reply to message #60724] Fri, 06 June 2008 14:55 Go to previous messageGo to previous message
Rick Towler is currently offline  Rick Towler
Messages: 821
Registered: August 1998
Senior Member
cgoethel wrote:
> Hello, I have a draw_widget with motion events set up. I draw a
> vertical line (using plots) which follows the cursor as it moves
> through the draw area. I can get the vertical line to follow the
> cursor easily enough - but I can't seem to figure out how to erase the
> previous lines. All the lines remain drawn. Any suggestions?

The easiest way is to redraw your background before you draw the new
vertical line in your motion event handler. Depending on what your
doing this can be quite costly in direct graphics. If re-plotting is
too slow you can create a copy of your draw widget background (using
something like tvread from www.dfanning.com) and simply re-draw this
image instead of running thru all of your plotting code. Either way
you'll want to work hard to minimize the drawing to only when it is
absolutely necessary.

The best way to do this is to use object graphics which is far better
suited for this type of application. The problem here is that there's a
bit of a learning curve...

-Rick
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Labelling the axes on a log plot
Next Topic: Re: widget, draw and file pickup

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sun Oct 12 13:01:28 PDT 2025

Total time taken to generate the page: 0.32072 seconds