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

Home » Public Forums » archive » Re: convert_coord & overplotting across multiple widget draw windows
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: convert_coord & overplotting across multiple widget draw windows [message #82663] Wed, 09 January 2013 19:07 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Brian Cherinka writes:

> 1.) Is there an easy way to erase the previous over-plotted lines without re-plotting the whole window?

Put the basic plot in a pixmap window and use the ol' smoke and mirrors
trick of Device Copy to "erase" the overplotted lines. It happens so
fast no one will suspect what you are doing. It is shocking how many
fabulous things can be done with such a simple technique. See the
AnnotateWindow program, for example:

http://www.idlcoyote.com/catalyst/annotate.html

> 2.) How would you suggest combining a single left-click to "click and plot something" and a left-click drag a rubber-band box to create a window to zoom in on the plot? I was thinking of putting the "click+plot" on a left button release event and have the box drawing on the motion, with a condition on release that if the new mouse coords are different than the old, then it's not a single click..so do the box thing and zoom.

It is VERY easy for draw widget event handling code to get completely
out of control if you try to be too clever. It's sometimes a lot easier
to put the draw window into "modes": draw plot mode, zoom mode, make a
box mode, etc. That way, you can just have different event handlers that
get selected for the draw widget, depending on what mode it is in. This
is a LOT easier to handle. The example above is a good example of this
technique, too.

Cheers,

David


--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: IDL command line access from inside a widget?
Next Topic: convert_coord & overplotting across multiple widget draw windows

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

Current Time: Sat Oct 11 11:14:59 PDT 2025

Total time taken to generate the page: 0.16043 seconds