next up previous contents
Next: Lock Viewport Up: Viewport Manipulation Subprograms Previous: Specify Viewport Mode

Define a Viewport

This Subprogram defines a new Viewport having the specified screen dimensions. The Viewport may later be referred to by its ID and text (or graphics) may be directed to it.

Short Name Calling Sequence

STATUS = UIDFVP(VPRTID,XLOW,XHIGH,YLOW,YHIGH)

Long Name Calling Sequence

STATUS = UI_DEFINE_VIEWPORT(...)

Input Arguments

VPRTID (Integer) Viewport ID XLOW (Real) Viewport Low X XHIGH (Real) Viewport High X YLOW (Real) Viewport Low Y YHIGH (Real) Viewport High Y

Output Arguments

None

Function Value

UI__SUCCESS ) Success UISUCC )

UI__NOT_INITIALIZED ) Package not Initialized UININI )

UI__ILLEGAL_VIEWPORT ) Illegal Viewport ID UIILVP )

UI__DUPLICATE_VIEWPORT ) Duplicate Viewport ID UIDUVP )

UI__ILLEGAL_LIMITS ) Illegal Viewport Limits UIILLI )

Note:

  1. Viewport IDs lie in the range 0-255.
  2. The Viewport Dimensions should be setup in the appropriate units for the currently setup Viewport Mode (Text or graphics). Thus for Text Mode they should be in units of Rows and Columns (but still specified as Floating Point Numbers), whereas for Graphics Mode they should be in Graphics Viewport Units (-1.0 to +1.0).
  3. The Viewport Mode is defaulted to Text on initialisation of UIPACK. It may be changed by calling UI_VIEWPORT_MODE and may be determined by calling UI_INQUIRE_VIEWPORT_MODE.
  4. For Graphics Viewport Mode, the current World Coordinate System (specified by a prior call to JWINDO) is saved internally. Subsequent requests to use this Viewport will setup both the Viewport placement and the World Coordinate System as defined by this call.
  5. Error UI__ILLEGAL_LIMITS will be reported if the Viewport Limits are unphysical (XLOW greater than XHIGH etc.)
  6. This Subprogram changes the definition of the currently setup Viewport to be that specified by the VPRTID Argument.


Liz Buckle
Fri Jan 13 17:49:20 CST 1995