Sun Microsystems 800-1256-04 — Sun Microsystems 800-1256-04 SunCGI Reference Manual PDF (EN)

Chapter 2 -- Initializing and Terminating SunCGI 19 0 EVDCSDIL (24] VDC space definition is illegal. ENOTCCPW (112] Function or argument not compatible with standard CG!. Device Viewport Cerror device_viewport(name, cl, c2) Cint name; /* name assigned to cgi view surface*/ Ccoor *cl, *c2; /* bottom left-hand and top right-hand*/ /* corner of view surface to map device onto*/ /* (expressed in pixels) */ device viewport redefines the limits of screen space. If the new limits are not less than or equal to the size of the current screen or window size, an error is returned. Although device viewport does not redefine the aspect ratio, it may redefine which areas of the screen are unused.

Errors ENOTOPOP [5] CGI not in proper state CGI shall be either in state CGOP, VSOP, or VSAC. EVSIDINV [JO] Specified view surface name is invalid. Specified view surface not open. EVSNOTOP (13] EBADRCTD (20] Rectangle definition is invalid. EBDVIEWP [21] Viewpon is not within Device Coordinates. 0 Clip Indicator ENOTCCPW (112] Function or argument not compatible with standard CGI. Cerror clip_indicator(cflag) Cclip cflag; /* CLIP, NOCLIP or CLIP_RECTANGLE */ For some application programs, it is desirable to clip explicitly within the viewpon, while other applications may seek to increase efficiency by not check- ing if the coordinates are within the bounds of the clipping area.

All SunCGI application programs will run faster if clipping is turned off. How- ever, clipping is turned on by default to prevent SunCGI from drawing outside of the bounds of the window. The extent ofvoc may be set with the vdc_extent function. The value of the argument cjlag determines whether output primitives are clipped before they are displayed. The default state is CLIP. The advantage of turning clipping off is that it improves the speed of drawing primitives. How- ever, if clipping is set to NOCLIP, SunCGI may draw output primitives outside of the window or within the bounds of an overlapping window.

If clipping is not NOCLIP, output primitives are clipped to either the clip rectangle (if cflag equals CLIP_RECTANGLE), or the full extent ofVDC space (if cjlag equals CLIP). typedef enum CLIP, NOCLIP, CLIP_RECTANGLE Cclip; 0 Version C of 17 March 1986