readpixels(3G) — Silicon Graphics
NAME
readpixels − returns values of specific pixels
SPECIFICATION
C
long readpixels(n, colors)
short n;
Colorindex colors[];
FORTRAN
integer*4 function readpi(n, colors)
integer*4 n
integer*2 colors(n)
Pascal
function readpixels(n: Short; var colors:
Colorindex): longint;
DESCRIPTION
readpixels attempts to read up to n pixel values from the bitplanes. It reads them into the array colors starting from the current character position along a single scan line (constant y) in the direction of increasing x. readpixels returns the number of pixels actually read, which is the number requested if the starting point is at least the same number from the edge of the screen. The values of pixels read outside the screen are undefined. readpixels updates the current character position to one pixel to the right of the last one read; the current character position is undefined if the new position is outside the viewport.
In double buffer mode, only the back buffer is read. Use readRGB to read pixels in RGB mode.
SEE ALSO
readRGB, writepixels Programming Guide, Section 3.9, Writing and Reading Pixels
NOTE
This routine is available only in immediate mode.
Version 3.6 — December 20, 1987