Coyote Graphics Routines

Date: Fri Mar 27 12:14:20 2015

single page | use frames     summary     class     fields     routine details     file attributes

.\

cgpixmapwindow__define.pro

Graphics


This is the "object" behind cgPixmap. It is a subclassed cgCmdWindow object and behaves almost identically, except that normally the draw widget at the heart of the window is invisible. That is, it is a pixmap.

Default properties of the object can be controled with cgWindow_SetDefs and cgControl, as with cgWindow. Be sure to delete the pixmap object when you are done with it, by using (for example) cgDelete.

Class description for cgPixmapWindow

Inheritance

Properties

Properties in cgCmdWindow

Properties in cgPixmapWindow

Method init
Multi init
_Extra set init
WXSize init
WYSize init
AltPS_Keywords init
P1 init
WDestroyObjects init
P2 init
P3 init
P4 init
OXMargin init
Visible set init
OYMargin init
EraseIt init
AltPS_Params init
WBackground init
Storage init
WAspect init
Group_Leader init
Command init
ReplaceCmd init

Fields

Fields in cgCmdWindow

Fields in cgPixmapWindow

VISIBLE 0L

Author information

Author

FANNING SOFTWARE CONSULTING:

David W. Fanning 1645 Sheely Drive Fort Collins, CO 80526 USA Phone: 970-221-0438 E-mail: david@idlcoyote.com Coyote's Guide to IDL Programming: http://www.idlcoyote.com

Copyright

Copyright (c) 2012, Fanning Software Consulting, Inc.

History

Change History:

Created from cgCmdWindow, 7 February 2012. DWF. Problem with the ASPECT keyword, which should have been named WASPECT. 7 Oct 2012. DWF. Added WDestroyObjects keyword to destroy objects parameters, if needed. 11 November 2012. DWF. Confusion trying to change WBackground keyword to Background. Changed it back. Identical to ASPECT problem described above. 18 Jan 2013. DWF.

Routines

result = cgPixmapWindow::INIT( [parent] [, AltPS_Keywords=string] [, AltPS_Params=IntArr(3)], Command=string [, /EraseIt] [, Group_Leader=Group_Leader] [, /Method] [, Multi=intarr(5)] [, OXMargin=float] [, OYMargin=float] [, P1=any] [, P2=any] [, P3=any] [, P4=any] [, /ReplaceCmd] [, Storage=any], Visible=Visible [, WAspect=float] [, WBackground=varies] [, /WDestroyObjects] [, WXSize=integer] [, WYSize=integer] [, _Extra=_Extra])

This method initializes the pixmap object.

cgPixmapWindow::SetProperty [, /VISIBLE] [, _EXTRA=_EXTRA]

This method allows you to set the properties of the object.

cgPixmapWindow__Define [, class]

The definition module for the cgPixmapWindow object

Routine details

top cgPixmapWindow::INIT

result = cgPixmapWindow::INIT( [parent] [, AltPS_Keywords=string] [, AltPS_Params=IntArr(3)], Command=string [, /EraseIt] [, Group_Leader=Group_Leader] [, /Method] [, Multi=intarr(5)] [, OXMargin=float] [, OYMargin=float] [, P1=any] [, P2=any] [, P3=any] [, P4=any] [, /ReplaceCmd] [, Storage=any], Visible=Visible [, WAspect=float] [, WBackground=varies] [, /WDestroyObjects] [, WXSize=integer] [, WYSize=integer] [, _Extra=_Extra])

This method initializes the pixmap object.

Parameters

parent in optional

The parent base widget for this draw widget object. If not defined, the program will create its own top-level base widget.

Keywords

AltPS_Keywords in optional type=string

A structure containing alternative keyword names (as tags) and values for those keywords to be used when the current device is the PostScript device. See http://www.idlcoyote.com/cg_tips/kwexpressions.php and the examples below for details on how to use this keyword.

AltPS_Params in optional type=IntArr(3)

A structure containing alternative parameter values to be used when the current device is the PostScript device. Structure names are restricted to the names "P1", "P2", "P3" and "P4"to correspond to the equivalent positional parameter. See http://www.idlcoyote.com/cg_tips/kwexpressions.php and the examples below for details on how to use this keyword.

Command in required type=string

The graphics procedure command to be executed. This parameter must be a string and the the command must be a procedure. Examples are 'Surface', 'Contour', 'Plot', 'cgPlot', cgContour, etc.

EraseIt in optional type=boolean default=0

Set this keyword to cause the window to be erased before graphics commands are drawn. This may need to be set, for example, to display images.

Group_Leader in optional

The identifier of a widget to serve as a group leader for this program. If the group leader is destroyed, this program is also destroyed. Used when calling this program from another widget program.

Method in optional type=boolean default=0

Set this keyword if the command is an object method call rather than a procedure call. If this keyword is set, the first positional parameter, p1, must be present and must be a valid object reference.

Multi in optional type=intarr(5)

Set this keyword in exactly the same way you would set the !P.Multi keyword. It will allow you to display multi-plots in the cgWindow graphics window.

OXMargin in optional type=float

A two-element array indicating the left and right X outside margins for the graphical display. Used only when doing multiple plots with WMulti.

OYMargin in optional type=float

A two-element array indicating the bottom and top Y outside margins for the graphical display. Used only when doing multiple plots with WMulti.

P1 in optional type=any

The first positional parameter appropriate for the graphics command.

P2 in optional type=any

The second positional parameter appropriate for the graphics command.

P3 in optional type=any

The third positional parameter appropriate for the graphics command.

P4 in optional type=any

The fourth positional parameter appropriate for the graphics command.

ReplaceCmd in optional type=boolean default=0

Set this keyword to replace a graphics command from an cgWindow. If CmdIndex is undefined, *all* commands in the window are replaced. Use WinID to identify the cgWindow you are interested in. If WinID is undefined, the last cgWindow created is used for the replacement.

Storage in optional type=any

Any user-defined IDL variable will be stored in the object storage location. Defined here for convenience. Same as Storage keyword for the SetProperty method.

Visible
WAspect in optional type=float default=normal

Set this keyword to the aspect ratio you would like the window to have. The aspect ratio is calculated as (ysize/xsize). Must be a float value. If this keyword is set, the window will maintain this aspect ratio, even when it is resized.

WBackground in optional type=varies default=!P.Background

The background color of the window. Specifying a background color automatically sets the WErase keyword.

WDestroyObjects in optional type=boolean default=0

If this keyword is set, and any of the input parameters p1-p4 is an object, the object parameter will be destroyed when the window is destroyed.

WXSize in optional type=integer default=640

The x size in device coordinates of the graphics window.

WYSize in optional type=integer default=512

The y size in device coordinates of the the graphics window.

_Extra in optional

The "extra" keywords for the command that is being added to the window.

top cgPixmapWindow::SetProperty

cgPixmapWindow::SetProperty [, /VISIBLE] [, _EXTRA=_EXTRA]

This method allows you to set the properties of the object. Most properties are passed along to the superclass method.

Keywords

VISIBLE in optional type=boolean

Set this keyword to make the pixmap visible.

_EXTRA in optional

Any keywords appropriate for the SetProperty method of the superclass object.

top cgPixmapWindow__Define

cgPixmapWindow__Define [, class]

The definition module for the cgPixmapWindow object

Parameters

class out optional type=struct

The object class structure definition. Occasionally useful.

File attributes

Modification date: Fri Mar 27 11:07:35 2015
Lines: 409
Docformat: rst rst