Coyote Library Updates: Device Independent Graphics Windows [message #78377] |
Fri, 18 November 2011 08:04 |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Folks,
I wanted to let you know about a couple of important updates
to the Coyote Library this morning. There was a problem with
axes being drawn in the wrong place when displaying a contour
plot in 3D space, so I have a new cgContour command available:
http://www.idlcoyote.com/programs/cgcontour.pro
But the change I am really excited about, because it
adds a lot of functionality to my programs, is a change
to cgDisplay:
http://www.idlcoyote.com/programs/cgdisplay.pro
Here is the problem. It is often the case that I want
to open a window of a particular size or aspect ratio
for one of my programs. (In this case, it was a new
map projection program, cgDrawShapes, that draws
shapefiles on maps.) This is not a problem per se,
but I also want to write programs that can be used
in the resizeable graphics window, cgWindow. One of
the "rules" for adding these kind of commands to
cgWindow is that you can't be opening your own
graphics windows!
The cgDisplay program is now the way out of this
wilderness!
If you open all your graphics windows with cgDisplay
you no longer have to worry about "protecting" your
windows in other devices or in cgWindow commands.
Here is how it works.
If cgDisplay is called in the normal way, it just
opens a graphics window. If it is called inside
the PostScript or Z graphics buffer devices, it
just configures those devices to have a "window"
with the specified aspect ratio. If you call
cgDisplay from a program that is running in a
cgWindow, it will simply ignore the request
entirely, so that the program output will appear
in the cgWindow display window.
This makes it much, MUCH easier to write graphics
programs!
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|