Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

readpixels(3)  —  Unix Programmer’s Manual

NAME

readpixels - return values of specific pixels

SYNOPSIS

C
short readpixels(n, colors)
short n;
Colorindex colors[];

FORTRAN
integer∗2 function readpi(n, colors)
integer∗2 n, colors(n)

Pascal
function readpixels(n: Short; var colors: Colorarray): Short;

DESCRIPTION

Readpixels reads pixel values to be read from the bitplanes.  It returns an array of n colors, starting from the current character position.  (In double buffer mode only the back buffer is read.)  It also returns the number of pixels read, which may be less than n if you attempt to read pixels with x > XMAXSCREEN. 

Pixel reading is not restricted to the current viewport, as is the current character position.  As long as the current character position is inside the viewport when the readpixels command is issued, any number of pixel values can be read, including those outside the viewport. 

Readpixels will not wrap to the next line of pixels when the cursor reaches the edge of the screen.  The current character position is updated when the readpixels command is executed.  The current position is set to one pixel to the right of the last one read, or invalidated if the new position is outside the viewport. 

SEE ALSO

readRGB, writepixels

NOTE

This command can only be used in immediate mode. 

Silicon Graphics  —  R1c

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