Re: Q: DEFROI for object-graphics? [message #11789] |
Tue, 26 May 1998 00:00 |
davidf
Messages: 2866 Registered: September 1996
|
Senior Member |
|
|
Herbert Tsang (htsang@mda.ca) writes:
> The CW_DEFROI that come with IDL do not work with object graphics,
> has anyone out there built something similar that will work with
> object graphics?
Yes, I've built something like this that works with object
graphics, but I have apparently deleted it in one of my
cleaning frenzies, because I can no longer find the code.
It is not difficult, however. The basic code was very
similar to the code to draw a free-hand line in a widget
program, which you can find on my web page in the Widget
Programming section:
http://www.dfanning.com/documents/tips.html
Instead of collecting each new point and storing it in
a vector, I just added each new point to a polyline object,
then I just called the draw method on the window. This
allowed the line to grow as I moved the cursor around.
It was really much easier than I had expected it to be.
Cheers,
David
-----------------------------------------------------------
David Fanning, Ph.D.
Fanning Software Consulting
E-Mail: davidf@dfanning.com
Phone: 970-221-0438
Coyote's Guide to IDL Programming: http://www.dfanning.com/
|
|
|