>  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 PS_START. Caused PSConfig 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.

© 2023 NV5 Geospatial |  Legal
My Account    |    Contact Us