Previous Next Up Title Contents Index Functions Index Top Library

VIEW CONFIGURATION

tview_config


CALL SEQUENCE

void tview_config (wkid, view_ind, viewport_type, clip)

INPUT PARAMETERS

Pint	wkid;
Pint	view_ind;
Tviewport_type	viewport_type;
Pclip_ind	clip;

ARGUMENTS

wkid
Identifier of the workstation on which the view is configured.
view_ind
Index of the view to be defined.
viewport_type
Type of viewport (last parameter of tview2_center and tview3_xxx)
clip
Indicator for image clipping at the edge of the viewport

EFFECT

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

TNON_ISOTROPIC_VIEWPORT

TISOTROPIC_VIEWPORT

TPHIGS_VIEWPORT

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 tview2_center.

#define CIRCLE	1
#define SCENID	2
#define WKID 	1
#define INVUE	1
static Plimit domain = {10.,20., 10.,20.};
static Ppoint center = {15.,15.};
Tcircle circle_s;
static Pint_list list_struct_list;
static Plimit viewport = { .... };
Tviewport_type type;

tdomain (&domain);	/* user space [10-20] × [10-20] */
circle_s.type = TCENTER_RADIUS;
circle_s.geometry.cr.c = center;
circle_s.geometry.cr.r = 5.;	/* circle centered at (15,15) */
tcircle (CIRCLE, &circle_s);	/* with radius 5 */
struct_list.num_ints = 1;
struct_list.ints [0] = CIRCLE;
tscene (SCENID,&struct_list,INVUE);	/* scene containing the circle */
ppost_struct (WKID,SCENID,0.);	/* post scene */
tview_config. (WKID,INVUE,type,PIND_CLIP);	/* view configuration */
tview2_center (WKID,INVUE, 0.5,0.5, 1.,viewport);	/* view definition */
predraw_all_structs (WKID,PFLAG_ALWAYS);	/* drawing */


Previous Next Up Title Contents Index Functions Index Top Library