cgDisplay [, pxsize] [, pysize], ASPECT=ASPECT [, COLOR=string/integer] [, /FREE] [, /FORCE] [, LOCATION=integer] [, /MATCH] [, /PIXMAP] [, RETAIN=integer] [, TITLE=string] [, WID=integer] [, WINDOW=integer] [, XPOS=integer] [, XSIZE=integer] [, YPOS=integer] [, YSIZE=integer] [, _EXTRA=any]
The purpose of cgDisplay is to open a graphics window on the display, or in the PostScript device, or in the Z-graphics buffer, depending upon the current graphics device. In PostScript a window of the proper aspect ratio is created with PSWindow. Using cgDisplay to open "windows" will allow you to more easily write device-independent IDL programs.
- pxsize in optional type=integer default=640
The X size of the graphics window created. By default, 640.
- pysize in optional type=integer default=512
The Y size of the graphics window created. By default, 512.
Set this keyword to create a window with this aspect ratio (ysize/xsize). If aspect is greater than 1, then the ysize will be used in the aspect ratio calculation. If the aspect is less than or equal to 1, then the xsize will be used in the aspect ratio calculation of the final window size. If the input to the ASPECT keyword is an image, then the aspect ratio will be calculated from the image itself.
- COLOR in optional type=string/integer default=white
If this keyword is a string, the name of the data color. By default, 'white'. Color names are those used with cgColor. Otherwise, the keyword is assumed to be a color index into the current color table. The color is not used if the "window" is opened in PostScript on the Z-graphics buffer.
- FREE in optional type=boolean default=0
Set this keyword to open a window with a free or unused window index number. This keyword applied only to graphics windows created on the computer display.
- FORCE in optional type=boolean default=0
Because of the way cgDisplay is designed to work in many devices and in resizeable graphics windows, it is sometimes the case that it won't create a window for you. If you set this keyword, a graphics window will be created while in any device that supports graphics windows.
- LOCATION in optional type=integer
Set this keyword to a two-element integer array indicated the pixel position of the upper-left corner of the graphics window from the upper-left corner of the display.
- MATCH in optional type=boolean default=0
If this keyword is set, the new display window will match the size of the current display window, if there is one.
- PIXMAP in optional type=boolean default=0
Set this keyword to create a pixmap window (a window in memory only).
- RETAIN in optional type=integer
Set this keyword to the values 0, 1, or 2, to indicate no backing store, server provided backing store, or IDL provided backing store, respectively. By default, set to 1 for Windows users and to 2 for UNIX users.
- TITLE in optional type=string
Set this keyword to a string that is used as the window title.
- WID in optional type=integer default=0
The window index number of the IDL graphics window to create.
- WINDOW in optional type=integer default=0
Because I want to use cgDisplay everywhere, including in resizeable graphics windows, and I don't want it opening windows then, it first checks to be sure there are no resizeable graphics windows on the display before it creates a window. Setting this keyword will overrule this check and create a normal IDL graphics window on the display. This will allow you to open a normal graphics window at the same time a resizeable graphics window exists on the display.
- XPOS in optional type=integer
The X position of the window, specified in device coordinates. On Motif platforms, XPOS specifies the X position of the lower left corner and is measured from the lower left corner of the screen. On Windows platforms, XPOS specifies the X position of the upper left corner and is measured from the upper left corner of the screen. This value can also be specified as the first element in the
- XSIZE in optional type=integer default=640
The X size of the graphics window created. By default, 640. The PXSIZE parameter is used in preference to the XSIZE keyword value.
- YPOS in optional type=integer
The Y position of the window, specified in device coordinates. On Motif platforms, YPOS specifies the Y position of the lower left corner and is measured from the lower left corner of the screen. On Windows platforms, YPOS specifies the Y position of the upper left corner and is measured from the upper left corner of the screen. This value can also be specified as the second element in the
- YSIZE in optional type=integer default=512
The Y size of the graphics window created. By default, 512. The PYSIZE parameter is used in preference to the YSIZE keyword value.
- _EXTRA in optional type=any
Any keywords supported by the WINDOW command are allowed.
Use like the IDL WINDOW command:
IDL> cgDisplay, XSIZE=500 YSIZE=400 IDL> cgDisplay, 500, 500, WID=1, COLOR='gray'
FANNING SOFTWARE CONSULTING:
David W. Fanning 1645 Sheely Drive Fort Collins, CO 80526 USA Phone: 970-221-0438 E-mail: email@example.com Coyote's Guide to IDL Programming: http://www.idlcoyote.com
Copyright (c) 2010-2012, Fanning Software Consulting, Inc.
Written, 15 November 2010. DWF. Changes so that color variables don't change type. 23 Nov 2010. DWF. Moved the window index argument to the WID keyword. 9 Dec 2010. DWF. Modified to produce a window in PostScript and the Z-buffer, too. 15 Dec 2010. DWF. Added the FREE keyword. 3 January 2011. DWF. I made a change that allows you to call cgDisplay inside a program that is going to be added to a cgWindow. The program will not open a graphics window if the current graphics window ID is found in a list of cgWindow window IDs. It is now possible to use cgDisplay in any graphics program, even those that will be run in cgWindow. 17 Nov 2011. DWF. Added ASPECT keyword. 18 Nov 2011. DWF. Allowed the window ASPECT to be set with an image argument. 25 Nov 2011. DWF. Now use Scope_Level to always create a display when cgDisplay is called from the main IDL level. 7 Feb 2012. DWF. Added FORCE and MATCH keywords. 16 Feb 2012. DWF. Added PIXMAP, RETAIN, TITLE, XPOS, YPOS, and LOCATION keywords. 4 Sept 2012. DWF.
|Modification date:||Tue Sep 04 07:38:53 2012|