The Viewport

The viewport is the mapping system for the Logical Coordinate System document. Like the document, it reads the picture's logical coordinates to determine its size, and then maps the logical coordinates onto the window.

NOTE: The Viewport  mapping does not apply to pictures that use the Enhanced Coordinate System.

CAUTION: If you resize a picture, then modify the viewport width or height (ViewPortHeight and ViewPortWidth properties), the picture's Logical Coordinate System is remapped. When this happens, objects in your pictures may appear skewed when resizing or autoscaling. If you are using custom scripts to manipulate these properties, these scripts become obsolete after an upgrade to the Enhanced Coordinates System. To avoid this problem, it is recommended that you either:

  • Do not modify the viewport height or width once you have resized a picture using the Logical Coordinate System.
  • Upgrade the picture to the Enhanced Coordinate System.

Logical Coordinate System Example

For example, when using a picture with a width of 100 logical units (or postscript points) and a height of 75 logical units (or postscript points) maintains a logical ratio with coordinates 0, 0 at the top left corner of the picture. This is illustrated in the following diagram.

The Logical Coordinate System

Look at the viewport as the lens of a camera. For example, if you have a picture containing a circle and a rectangle, and you define the viewport to begin as shown in the following picture:

 

Then the picture will be displayed as shown in the following figure: