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

Chapter 3 -Output 47 0 the replicated pattern array overlaps with the source array on the screen, the visual result depends on the current drawing mode. Multiple view surfaces and bitblt's are incompatible, so a name argument must be specified. Errors ENOTVSAC [4] CGI not in proper state: CGI shall be in state VSAC. EVALOVWS [69] Value outside of view surface. EPXNOTCR [70] Pixrect not created.

Inquire Cell Array Cerror inquire_cell_array(name, p, q, r, dx, dy, colorind) Cint name; /* view surface name*/ Ccoor *p, *q, *r; /* corners of parallelogram (in VDC space) */ Cint dx, dy; /* dimensions of color array*/ Cint *colorind; /* array of color values*/ Points p, q and r (in VDC space) define a parallelogram with line p-q as the diagonal where p is the lower left-hand corner. r is one of the remaining two comers. dx and dy define the width and the height of the array colorind which contains the colors of the pixels on the screen which lie within the parallelogram defined by p, q, and r.

Notice that a view surface identifier, name, must be specified because the result of this function is highly dependent on the dimen- sions and contents Q.f the view surface. 0 The area of the screen corresponding to the parallelogram is a~sumed to contain a regular grid of points. However, if each element of the grid is larger than one pixel, the color of the pixel at lower left-hand comer of each element of the grid is defined to be the color of the grid element. Therefore, the values contained in colorind are highly dependent on the size of the view surface. An error is pro- duced if the elements of the grid are smaller than one pixel. Errors ENOTVSAC [4] CGI not in proper state:

CGI shall be in state VSAC. EVSIDINV [10] Specified view surface name is invalid. EVSNOTOP [13] Specified view surface not open. EVSNTACT [15] Specified view surface is not active. ECELLATS [66] Cell array dimensions dx, dy are too small. ECELLPOS [67] Cell array dimensions must be positive.

Inquire Pixel Array Cerror inquire_pixel_array(p, m, n, colorind, name) Ccoor *p; /* base of array in VDC space*/ Cint m, n; /* dimensions of color array in screen space*/ Cint *colorind; /* array of color values*/ Cint name; /* view surface name*/ 0 inquire_pixel_array fills array colorind with the values of pixels in the area of the screen defined by pointp (expressed in VDC space) and m and n (expressed in screen space). The array is filled down and to the right from point Version C of 17 March 1986