Coyote Graphics Routines

Date: Fri Mar 27 12:14:20 2015

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

.\

cgwindow_setdefs.pro


top cgWindow_SetDefs

Graphics

cgWindow_SetDefs [, /AdjustSize] [, Aspect=float] [, Background=string] [, Delay=float] [, /EraseIt] [, IM_Density=integer] [, /IM_PNG8] [, IM_Options=string] [, /IM_Raster] [, IM_Resize=integer] [, IM_TIFF_Depth=integer] [, /IM_Transparent] [, IM_Width=integer] [, Multi=Intarr(5)] [, Palette=byte] [, PDF_Unix_Convert_Cmd=string] [, PDF_Path=string] [, /PS_Decomposed] [, /PS_Delete] [, /PS_Metric] [, /PS_Encapsulated] [, PS_FONT=integer] [, PS_CHARSIZE=float] [, /PS_QUIET] [, PS_SCALE_FACTOR=float] [, PS_TT_FONT=string] [, /Reset] [, XOMargin=intarr(2)] [, YOMargin=intarr(2)] [, XSize=integer] [, YSize=integer] [, /Title] [, XPos=integer] [, YPos=integer]

Allows the user to set global defaults for resizeable cgWindow programs.

Keywords

AdjustSize in optional type=boolean default=0

Set this keyword to have the default text size adjusted to fit the size of the display window.

Aspect in optional type=float default=0.0

Set the aspect ratio of the window. If set to 0, the normal "default" window aspect ratio is used and nothing special is done when the window is resize. If aspect is not 0, then the window is confined to this aspect ratio.

Background in optional type=string

The background color of the window. Only use if the ERASEIT property is also set.

Delay in optional type=float default=0

Set this keyword to the amount of delay desired between command execution. 0

EraseIt in optional type=boolean

If this property is set, the cgWindow erases with the background color before displaying the commands in the window's command list.

IM_Density in optional type=integer default=300

Set this keyword to the sampling density when ImageMagick creates raster image file from PostScript output.

IM_PNG8 in optional type=boolean default=0

Set this keyword to create an 8-bit PNG file rather than the normal 24-bit PNG file.

IM_Options in optional type=string

Set this keyword to any ImageMagick options you would like to pass along to the ImageMagick convert command when creating raster image files from PostScript output.

IM_Raster in optional type=boolean default=1 (if ImageMagick is found)

When raster files are created programmatically, this keyword determines if the raster file is created directly in IDL (value =0) or is created from a PostScript intermediate file via ImageMagick (value =1). The default is via ImageMagick if the convert program can be found on the machine running the program.

IM_Resize in optional type=integer default=25

Set this keyword to percentage that the raster image file created my ImageMagick from PostScript output should be resized.

IM_TIFF_Depth in optional type=integer default=8

Set this keyword to the number of bits per channel in TIFF file output. Allowed values are 8, 16, and 32.

IM_Transparent in optional type=boolean default=0

Set this keyword to allow ImageMagick to create transparent backgrounds when it makes raster image files from PostScript output.

IM_Width in optional type=integer

Set this keyword to the width of the output raster file in pixel units. The height of the raster file is set to preserve the aspect ratio of the output image. Applies only to raster images (eg PNG, JPEG, TIFF, etc.) created from PostScript files with ImageMagick.

Multi in optional type=Intarr(5)

Set this keyword to the !P.MULTI setting you want to use for the window. !P.MULTI is set to this setting before command execution, and set back to it's default value when the commands are finished executing.

Palette in optional type=byte

Use this keyword to pass in an N-by-3 (or 3-by-N) byte array containing the R, G, and B vectors of a color table. It is probably easier to use cgLoadCT or XCOLORS to load color tables for the window, but this is provided as another option.

PDF_Unix_Convert_Cmd out optional type=string

Set this keyword to the name of an alternative UNIX command to convert PostScript to PDF.

PDF_Path out optional type=string

Set this keyword to the name of the path to the Ghostscript command for converting PS to PDF.

PS_Decomposed in optional type=boolean

If set, use decomposed color in the PostScript device.

PS_Delete in optional type=boolean default=1

Set this keyword to zero if you want to keep the PostScript output ImageMagick creates when making raster file output.

PS_Metric in optional type=boolean default=0

Set this keyword to configure cgPS_Config to use metric values and A4 page size in its interface.

PS_Encapsulated in optional type=boolean default=0

Set this keyword to configure cgPS_Config to produce encapsulated PostScript output by default.

PS_FONT in optional type=integer default=0

Set this to the !P.Font value to use for creating PostScript files.

PS_CHARSIZE in optional type=float default=0.0

Set this value to the !P.Charsize value to use when creating PostScript output. This value is not used if !P.Charsize is set to anything other than 0.0.

PS_QUIET in optional type=boolean default=0

Set this keyword to suppress output messages from cgPS_Open and cgPS_Close.

PS_SCALE_FACTOR in optional type=float default=1.0

Set this keyword to the PostScript scale factor you want to use for PostScript output.

PS_TT_FONT in optional type=string default=Helvetica

Set this keyword to the name of the PostScript true-type font to use for PostScript output. Not used, unless !P.Font=1.

Reset in optional type=boolean default=0

Set this keyword to reset all values to their default values.

XOMargin in optional type=intarr(2)

Set this keyword to set !X.OMargin to this value for multiplots.

YOMargin in optional type=intarr(2)

Set this keyword to set !Y.OMargin to this value for multiplots.

XSize in optional type=integer default=640

Set this keyword to the starting X size of the window.

YSize in optional type=integer default=512

Set this keyword to the starting Y size of the window.

Title in optional type=boolean

If this keyword is set, the selection is assumed to be a window title. All matching is done in uppercase characters.

XPos in optional type=integer

Set this keyword to the X offset of the window from the upper-left corner of the display.

YPos in optional type=integer

Set this keyword to the Y offset of the window from the upper-left corner of the display.

Examples

Used to set cgWindow global properties:

IDL> cgLoadCT, 5, RGB_TABLE=palette IDL> cgWindow_SetDefs, PALETTE=palette, $ ERASEIT=1, XSIZE=800, YSIZE=400, XPOS=100, YPOS=200, $ PS_ENCAPSULATED=1, PS_METRIC=1 IDL> cgImage, cgDemoData(7), /WINDOW, MARGIN=0.1

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) 2011, Fanning Software Consulting, Inc.

History:

Change History:

Written, 29 January 2011. DWF. Small bug fixes, and addition of PS_QUIET keyword. 17 Feb 2011. DWF. Added Raster_IM, 18 February 2011. Jeremy Bailin. Added the ability to set and unset adjustable text size in cgWindow with ADJUSTSIZE keyword. 24 April 2011. DWF. Added PS_DECOMPOSED keyword to set the PostScript color mode. 30 Aug 2011. DWF. Added ASPECT keyword to allow getting/setting of window aspect ratio. 18 Nov 2011. DWF. Added PDF_UNIX_CONVERT_CMD and PDF_PATH keywords. 7 Dec 2011. DWF. Added IM_WIDTH keyword. 3 April 2012. DWF. Added IM_PNG8 keyword. 3 April 2012. DWF. Added IM_TIFF_DEPTH keyowrd. 14 May 2013. DWF.

File attributes

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