Sun Microsystems 800-1256-04 — Sun Microsystems 800-1256-04 SunCGI Reference Manual PDF

66 SunCGJ Reference Manual pattern box begins. The pattern is then replicated over all VDC space. The upper 0 left-hand comer of the pattern box is determined by begin. The default pattern reference point is (0, 0). pattern_reference_point has no effect if the interior style is not set to PATTERN. Errors ENOTOPOP [5] CGI not in proper state CGI shall be in state VDOP, VSOP, or VSAC. Pattern Size Cerror pattern_size(dx, dy) Cint dx, dy; /* size of pattern in VDC space*/ pattern_size defines the size of the pattern array in VDC coordinates. dx and dy determine the size of an element of the pattern in VDC space. pattern size therefore allows you to 'stretch' the pattern to a certain size.

If dx or dy would result in pattern elements less than one pixel wide, 1 is used. If the pattern size is larger than the bounds of screen space, the effective pattern size is the size of VDC space. The default pattern size is (300, 300). Errors ENOTOPOP [5] CGI not in proper state CGI shall be in state VDOP, VSOP, or VSAC. Pattern with Fill Color (SunCGI Extension) Cerror pattern_with_fill_color(flag) Cflag flag; /* ON to use nonzero pattern elements as fill color*/ Binary patterns allow the same pattern to be applied in different colors, without 0 redefining the pattern array. pattern_with_fill_color sets a non- standard CG! state pattern with fill color.

The default pattern with fill color is OFF and each color value in a pattern table entry is used verbatim, as in standard CGI. When a pattern is used while flag is ON, the pattern is considered to be a 20 array of flags: where the pattern element is nonzero, the current fill color is used, instead of the actual value of the pattern element. (When pattern with fill color is zero, a zero color index is used, just as when the flag is OFF.) 4.7. Perimeter Attributes The following sections contain descriptions of functions that determine the per- imeter attributes perimeter type, perimeter width , perimeter width specification mode and perimeter color.

Perimeter Type Cerror perirneter_type(ttyp) Clintype ttyp; /* style of perimeter*/ perimeter_type defines the perimeter type for solid objects. The enumerated type Clintype contains values that correspond to valid perimeter types. Version C of 17 March 1986 0