SET WORKSTATION WINDOW(3P) — SUNPHIGS LIBRARY
NAME
SET WORKSTATION WINDOW − specify a 2D window to be displayed on the workstation
SYNOPSIS
C Syntax
void
psetwswindow ( ws, window )
Pintws;workstation id
Plimit∗window;workstation window limits
FORTRAN Syntax
SUBROUTINE pswkw ( WKID, XMIN, XMAX, YMIN, YMAX )
INTEGERWKIDworkstation identifier
REALXMIN, XMAX, YMIN, YMAX workstation window limits (NPC)
Required PHIGS Operating States
(PHOP, WSOP, ∗, ∗)
DESCRIPTION
Purpose
SET WORKSTATION WINDOW defines the 2D area in Normalized Projection Coordinate (NPC) space to be displayed on the specified workstation. The workstation window is a rectangular box in NPC space, which is mapped to the “workstation viewport”, defined in Device Coordinate (DC) space.
Together, the “workstation window” and the “workstation viewport” define the workstation transformation that converts the image from NPC to DC on the workstation’s physical display surface. The workstation window defines what within NPC space will be displayed; the workstation viewport defines where the image will be displayed in DC space.
Control of the workstation window allows you to choose a portion of the abstract image composed in NPC space for display on the workstation, without changing the definition of the image in NPC space.
C Input Parameters
wsThe identifier of the workstation for which the window is to be set.
window
A pointer to a structure containing the 4 2D NPC workstation window limits, defined as follows:
typedef struct {
Pfloatxmin;/∗ x minimum ∗/
Pfloatxmax;/∗ x maximum ∗/
Pfloatymin;/∗ y minimum ∗/
Pfloatymax;/∗ y maximum ∗/
} Plimit;
FORTRAN Input Parameters
WKIDThe identifier of the workstation for which the window is to be set.
XMINThe x minimum value in DC for the 2D workstation window.
XMAX
The x maximum value in DC for the 2D workstation window.
YMINThe y minimum value in DC for the 2D workstation window.
YMAX
The y maximum value in DC for the 2D workstation window.
Execution
The ‘current workstation window’ defines the rectangular box in Normalized Projection Coordinates (NPC) containing the portion of the abstract image to be displayed within the ‘current workstation viewport’. Together, the “workstation window” and the “workstation viewport” define an isotropic workstation transformation that converts the image from NPC to DC on the workstation’s physical display surface.
The range for each of the workstation window limits is [0,1]; in addition, x minimum must be less than x maximum, and y minimum must be less than y maximum. Output is automatically clipped at the workstation window limits, and this clipping cannot be disabled.
SET WORKSTATION WINDOW sets the x and y components of the ‘requested workstation window’ in the specified workstation’s state list to the values specified. The z component of the ‘requested workstation window’ and ‘current workstation window’ is not changed. The effect of calling SET WORKSTATION WINDOW is visible only after the ‘requested workstation window’ replaces the ‘current workstation window’. The time at which this occurs depends on the workstation’s ‘display update state’. This action is performed immediately, and the ‘workstation transformation update state’ is set to NOTPENDING, if any one of the following is true:
1.The workstation’s ‘display update state’ allows update.
2.The workstation’s ‘modification mode’ is any value other than “No Immediate Visual Effect”, and the ‘dynamic modification accepted for workstation transformation’ entry in the workstation description table is set to “Immediate”.
3.The ‘display space empty’ status in the workstation state list is EMPTY.
Otherwise, the ‘workstation transformation update state’ is set to PENDING, and the ‘requested workstation window’ will not replace the ‘current workstation window’ until the next time the workstation is updated. The ‘workstation transformation update state’ will be set to NOTPENDING at that time.
If the current workstation window and viewport do not have the same aspect ratios, the workstation transformation will preserve the proportions of the image by mapping the workstation window to the largest possible area within of workstation viewport such that
•the aspect ratio of the window in x and y is maintained, and
•the lower left hand corner of the window is mapped to the lower left hand corner of the viewport.
If the aspect ratios of the workstation window and viewport are different, there will be unused space along the upper or right-hand edges of the viewport, but not both.
The default workstation transformation maps the entire NPC view volume, [0,1] × [0,1] × [0,1], onto the largest square in the workstation display space including the display’s lower left corner.
ERRORS
003Ignoring function, function requires state (PHOP, WSOP, ∗, ∗)
054Ignoring function, the specified workstation is not open
057Ignoring function, specified workstation is of category MI
151Ignoring function, invalid window; XMIN ≥ XMAX, YMIN ≥ YMAX, or ZMIN > ZMAX
156Ignoring function, the workstation window limits are not within NPC range
SEE ALSO
SET WORKSTATION VIEWPORT (3P)
SET WORKSTATION WINDOW 3 (3P)
Sun Release 4.0 — Last change: 1 August 1989