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

44 SunCGI Reference Manual would stan. The arguments /left, uleft, and uright return three of the four 0 comers of the bounding box of text contained in tstring . The bounding box is a parallelogram (a rectangle if the character up vector and the character base vector are onhogonal). The names of the parallelogram comers are correct if no rotation is applied to the text. For some character orien- tations, the implied relationships do not hold. For example, /left may not be the lowest. The founh comer may be easily calculated from the three returned:

uright->x + lleft->x - uleft->x uright->y + lleft->y - uleft->y The concatenation point and text alignment parallelogram are returned in VDC space, but assume a text position of (0, 0). If the text is to be drawn at a position (x, y) then (x, y) must be added to each point to yield the true locations. The values of /left, ulejt, and uright are defined by the bounding box of the character and therefore may not be at the exact pixel where the character ends or begins. Errors ENOTVSAC [4] CGI not in proper state: CGI shall be in state VSAC.

Cell Array Cerror cell_array(p, q, r, dx, dy, colorind) Ccoor *p, *q, *r; /* corners of parallelogram (in VDC space) */ Cint dx, dy; /* dimensions of color array*/ Cint *colorind; /* array of color values*/ 0 cell_array draws a scaled and skewed pixel array on the view surface(s). Points p, q and r (expressed in VDC space) define a parallelogram. Line p-q is a diagonal and p is the lower left-hand comer. r is one of the remaining two comers. dx and dy define the width and the height of the array colorind which is mapped onto the parallelogram defined by p , q, and r. cell_array is one of the few primitives which depends on the actual size of the view surface.

Cell arrays are not drawn if the elements of the array would be smaller than one pixel. However, because different view surfaces may have dif- ferent dimensions, a cell array might be drawn on one view surface, but not on another smaller view surface. Finally, all cells composing the cell array are the same size; therefore, the upper left hand comer of the cell array might be down and to the right of point q because of the accumulated error of making all of the cells slightly smaller than their floating point size. For example if each cell of a 3 x 3 cell array is supposed to be 3.333 pixels wide, the actual cell array will be nine pixels wide instead of ten.

Errors ENOTVSAC (4) CGI not in proper state: CGI shall be in state VSAC. ECELLATS [66] Cell array dimensions dx, dy are too small. ECELLPOS [67) Cell array dimensions must be positive. 0 Pixel Array Version C of 17 March 1986