Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ readpixels(3g) — GL2 W2.3

Media Vault

Software Library

Restoration Projects

Artifacts Sought

readpixels()  —  Silicon Graphics Beta Release

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: Colorarray): longint;

DESCRIPTION

readpixels attempts to read up to n pixel values from the bitplanes.  They are read 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 only guaranteed to be the number requested if the starting point is at least that many away from the edge of the current viewport.  The values of pixels read outside the current viewport are undefined.  The current character position is updated to be one pixel to the right of the last one read, or 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

NOTE

This command can be used only in immediate mode. 

Version 2.3  —  July 04, 1985

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026