Previous Next Up Title Contents Index Functions Index Top Library

VIEW CONFIGURATION

TVIEWC


CALL SEQUENCE

TVIEWC (WKID, VIEWID, MODE, CLIP) 

INPUT PARAMETERS

INTEGER	WKID
INTEGER	VIEWID
INTEGER	MODE
INTEGER	CLIP

ARGUMENTS

WKID
Identifier for the workstation on which the view is to be configured.
VIEWID
Index of the view to configure.
MODE
Type of viewport (last parameter of TV2CEN and TV3xxx ).
CLIP
Image clipping indicator.

EFFECT

This function allows a viewport configuration definition by the functions TV2CEN and TV3xxx if the workstation has already been opened with TOPWK. The viewport is the part of the graphic window in which is displayed the image defined by the scene and by the view function.

MODE = 1 The viewport is defined with respect to the space [0-1] × [0-1], representing the entire graphic window. If the graphic window does not have the same aspect ratio, height/width, as the viewport, there will be a deformation of the image when it is displayed (for example, a circle could appear as an ellipse).

MODE = 2 The viewport is defined with respect to the space [0-1] × [0-1], representing the entire window. Images are never deformed, even if the graphic does not have the same aspect ratio as the viewport (for example, a circle will always appear as a circle). This is the default mode if the workstation is opened by TOPWK and if TVIEWC is not called.

MODE = 0 The viewport is defined with respect to the space [0-1] × [0-1], representing the PHIGS NPC space (see the PHIGS reference manual).

Example: A scene defined in user space, [10-20] × [10-20], has a circle centered at (15,15) with radius 5. Visualization of this scene with the function TV2CEN .

CALL TDOMA2 (10.,10., 20.,20.) user space [10-20] × [10-20]

CALL TCCR2 (CIRCLE, 15.,15., 5.) circle centered at (15,15) with 5

CALL TSCENE (SCENID,1,CIRCLE,VIEWID) scene containing the circle

CALL PPOST (WKID,SCENID,0.) post the scene

CALL TVIEWC (WKID,VIEWID,MODE,CLIP) view configuration VIEWID

CALL TV2CEN (WKID,VIEWID, 0.5,0.5, 1.,VIEWPT) view definition VIEWID

CALL PRST (WKID,PCONDI) display

(


Previous Next Up Title Contents Index Functions Index Top Library