Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ readrgb(3G) — GL2 W3.6

Media Vault

Software Library

Restoration Projects

Artifacts Sought

readRGB(3G)  —  Silicon Graphics

NAME

readRGB − returns values of specific pixels

SPECIFICATION

C
long readRGB(n, red, green, blue)
short n;
RGBvalue red[], green[], blue[];

FORTRAN
integer*4 function readRG(n, red, green, blue)
integer*4 n
character*(*) red, green, blue

Pascal
function readRGB(n: longint; var red, green, blue:
RGBvalue): longint;

DESCRIPTION

readRGB attempts to read up to n pixel values from the bitplanes.  It reads them into the red, green, blue arrays starting from the current character position along a single scan line (constant y) in the direction of increasing x.  readRGB returns the number of pixels actually read, which is the number specified in n 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. 

readRGB 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. 

readRGB is available only in RGB mode. 
 

SEE ALSO

readpixels, writeRGB Programming Guide, Section 3.9, Writing and Reading Pixels

NOTE

This routine is available only in immediate mode. 

Version 3.6  —  December 20, 1987

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