Re: plot and contour inconsistency [message #84044 is a reply to message #83560] |
Fri, 19 April 2013 20:29  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Matthew Argall writes:
> This is quite great! I had been doing something similar, but the /ALLOCATE_HEAP keyword eluded me...
>
> I was wondering, in the cgZPlot::DrawPlot method, is there a reason you call cgGraphicsKeywords::GetProperty? Why can't you get all of the properties by doing simply, e.g., *self.max_value, since cgGraphicsKeywords is inherited?
Mostly because I already had this code written for the GetProperty
method and I didn't want to write it again. Laziness, I guess I'm
saying. :-)
> Also, why do you always draw to the pixmap then copy to the display?
Copying from a pixmap is 100x faster than drawing the graphic, so this
is a standard buffering technique to prevent "flicker", as you
quickly draw and erase things like the rubberband box in the graphics
window. Flicker can be especially apparent as the graphics window gets
larger. It is used here mostly for the panning operations, which would
flicker a lot if the pixmap wasn't used.
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.")
|
|
|