Welcome to the Harris Geospatial product documentation center. Here you will find reference guides, help documents, and product libraries.

Harris Geospatial / Docs Center / Libraries / Coyote / CGCMDWINDOW__DEFINE


  Creates a "command" window for IDL traditional commands (Plot, Contour,
  Surface, etc. or for Coyote Graphics routines, cgPlot, cgContour, cgSurf, etc.).
  In addition, the window contents can be saved as PostScript files or as raster image
  created in very high quality from PostScript files. This program can be used in
  place of a normal draw widget or as a stand-alone program.
  The program is designed to work with any IDL traditional graphics routine
  that is a procedure and includes no more than four positional parameters.
  Any number of keywords can be used to specify properties of the graphical
  output. Any number of graphics commands can be "added" the the window.
  Simply use the AddCommand method to add commands.
  If your program does not load its own color tables, the color tables in
  effect when this program is initiated are used to display the graphics
  To create PostScript output from within the program, your graphics program
  has to be written in such a way that it can work properly in the PostScript
  device. This means there are no Window commands, WSet commands, and the like
  that are not allowed in the PostScript device. Such commands are allowed in
  programs, of course, if they are "protected". Usually such protection looks
  like this::
    IF (!D.Flags AND 256) NE 0 THEN Window, ...
  The Coyote Graphics program `cgDisplay` is a good program for opening graphics
  "windows", because such PostScript protection is built into the program. In a PostScript
  device, cgDisplay produces a "window" with the same aspect ratio as the current
  display graphics window, which is an aid in producing PostScript output that
  looks like the same output in the display window.
  Much better looking raster files can be created from the graphics window contents,
  if the raster files are created by converting PostScript files to the raster
  file. If the ImageMagick "convert" command can be found on your machine, you
  will have the option to create raster files using this method. I *highly*
  recommend doing so, as fonts and other plot annotation will be of much higher
  quality using this method.
  This program has been designed to work with other Coyote Graphics routines: `cgPlot`,
  `cgContour`, `cgSurf`, and so on, although I expect it to work with any IDL
  traditional graphics routine, if the routine is well written.




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


    Change History::
        Separated from old cgWindow program 22 Jan 2012, by David W. Fanning.
        Fixed a typo in PackageCommand method that prevented extra keywords from
          being collectd. 26 Jan 2012. DWF.
        Fixed a problem with MULTI keyword. 31 Jan 2012. DWF.
        Added a COPY method. 7 Feb 2012. DWF.
        Fixed a problem with input filenames in the AutoRasterFile method. 22 Feb 2012. DWF.
        Modified Draw_Widget creation routine to account for events that were added in
          different versions of IDL. 23 Feb 2012. DWF.
        Added ability to use IM_WIDTH keyword to set the width of raster file output
          created with ImageMagick. 3 April 2012. DWF.
        Forgot to specify the GROUP_LEADER when calling cgPS_Open. Caused cgPS_Config to
          run though its block when cgWindow was called from a blocking widget program.
          5 June 2012. DWF.
        Added the ability to save the file name and directory of the last output file, so
            that subsequent file saves can use that last name and directory as a starting
            default filename. 11 July 2012. DWF.
        In decompling cgWindow from cgCmdWindow, I accidentally named the WASPECT keyword ASPECT. Restored
            original name in this version. 13 July 2012. DWF.
        I added a new method, ReplaceEscapeSequences, that can evaluate escape sequences in
            string parameters and keywords to call the appropriate cgSymbol value at run-time.
            This eliminates the need for alternate keywords. 27 July 2012. DWF.
        Added WDestroyObjects keyword to destroy objects parameters, if needed. 11 November 2012. DWF.
        Not adding IM_WIDTH parameter from cgWindow_GetDefs. 19 November 2012. DWF.
        Modified ReplaceEscapeSequence method to use cgCheckForSymbols. 24 November 2012. DWF.
        Modified to allow keywords to turn off messages from cgPS_Open and cgPS_Close with keywords. 27 November 2012. DWF.
        The output filename was not specified correctly when making PDF file automatically. Fixed. 2 Dec 2012. DWF.
        Renamed the MULTI keyword to WMULTI, as it was suppose to be. 11 Feb 2013. DWF.
        Misspelled keyword in PackageCommand method. 21 February 2013. DWF.
        Modified GUI so there is only one Raster Image File choice, depending on if ImageMagick is
          installed. 21 May 2013. DWF.
        I made the IM_WIDTH field in the object a pointer, so it could remain an undefined variable,
            if necessary. 20 FEB 2014. DWF.
        Typo in the spelling of DESTROYOBJECTS when restoring a graphic visualization. Fixed. 20 Feb 2015. DWF.

© 2017 Exelis Visual Information Solutions, Inc. |  Legal
My Account    |    Buy    |    Contact Us