>  Docs Center  >  Libraries  >  Coyote  >  CGPSWINDOW


  This function is used to calculate the size of a PostScript window that has the same
  aspect ratio (ratio of height to width) as the current display graphics window. It
  creates the largest possible PostScript output window with the desired aspect ratio.
  This assures that PostScript output looks similar, if not identical, to normal
  graphics output on the display.


    Utilities, Graphics


    To create a PostScript output window with the same aspect
    ratio as the curently active display window, type::
      pageInfo = cgPSWINDOW()
      SET_PLOT, 'PS'
      DEVICE, _Extra=pageInfo
    To configure the PRINTER device::
      pageInfo = cgPSWINDOW(/Printer, Fudge=0.25)
      DEVICE, _Extra=pageInfo


      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


    Change History::
      Written by: David W. Fanning, November 1996.
      Fixed a bug in which the YOFFSET was calculated incorrectly
          in Landscape mode. 12 Feb 97.
      Took out a line of code that wasn't being used. 14 Mar 97.
      Added correct units keyword to return structure. 29 JUN 98. DWF
      Fixed a bug in how landscape offsets were calculated. 19 JUL 99. DWF.
      Fixed a bug in the way margins were used to conform to my
          original conception of the program. 19 JUL 99. DWF.
      Added Landscape and Portrait fields to the return structure. 19 JUL 99. DWF.
      Added PageSize keyword, changed MARGIN keyword, and completely
          rewrote most of the intenal code. 9 FEB 2000. DWF.
      Fixed a bug in how I calculated the aspect ratio. 1 MAR 2000. DWF.
      Added PRINTER keyword to return proper offset values for the
          PRINTER device, where the offset location is not rotated. 1 MAR 2000. DWF.
      Added PRINTER fudge factors to take into account that printer offsets are
          calculated from the printable area of the paper, rather than the corner
          of the paper. 8 AUG 2000. DWF.
      Changed the default margin to 0.05 from 0.15. 29 Nov 2004, DWF.
      Added EUROPEAN keyword and set LANDSCAPE mode if window wider than higher
          as the default if LANDSCAPE is not set. 13 Dec 2010. DWF.
      Added ASPECTRATIO keyword to allow user-specified window aspect ratio. 13 Dec 2010. DWF.
      Depreciated EUROPEAN keyword in favor of METRIC. 31 Jan 2011. DWF.
      Now setting LANDSCAPE=0 if aspect GT 1 and not set otherwise. 19 Feb 2013. DWF.
      Renamed cgPSWIndow from PSWindow. 10 Feb 2014. DWF.
      Added SANE_OFFSETS keyword. 10 Feb 2014. DWF.


    Copyright (c) 1996-2014, Fanning Software Consulting, Inc.

© 2020 Harris Geospatial Solutions, Inc. |  Legal
My Account    |    Store    |    Contact Us