*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->IRIX man pages -> standard/lrectread (3)              
Title
Content
Arch
Section
 

Contents


lrectread(3G)							 lrectread(3G)


NAME    [Toc]    [Back]

     rectread, lrectread - reads a rectangular array of	pixels into CPU	memory

C SPECIFICATION    [Toc]    [Back]

     long rectread(x1, y1, x2, y2, parray)
     Screencoord x1, y1, x2, y2;
     Colorindex	parray[];

     long lrectread(x1,	y1, x2,	y2, parray)
     Screencoord x1, y1, x2, y2;
     unsigned long parray[];

PARAMETERS    [Toc]    [Back]

     x1	      expects the x coordinate of the lower-left corner	of the
	      rectangle	that you want to read.

     y1	      expects the y coordinate of the lower-left corner	of the
	      rectangle	that you want to read.

     x2	      expects the x coordinate of the upper-right corner of the
	      rectangle	that you want to read.

     y2	      expects the y coordinate of the upper-right corner of the
	      rectangle	that you want to read.

     parray   expects the array	to receive the pixels that you want to read.

FUNCTION RETURN	VALUE
     The returned value	of this	function is the	number of pixels specified in
     the rectangular region, regardless	of whether the pixels were actually
     readable (i.e. on-screen) or not.

DESCRIPTION    [Toc]    [Back]

     rectread and lrectread read the pixel values of a rectangular region of
     the screen	and write them to the array, parray. The system	fills the
     elements of parray	from left-to-right, then bottom-to-top.	 All
     coordinates are relative to the lower-left	corner of the window, not the
     screen or viewport.

     Pixels are	read from the currently	active framebuffer, as specified by
     drawmode.	Thus, to read pixel values from	the overlay bitplanes, for
     example, simply set drawmode to OVERDRAW.	Use readsource to specify the
     pixel source within the current framebuffer (backbuffer, frontbuffer, or
     z-buffer, for example) from which both rectread and lrectread take	pixel
     values.

     rectread fills an array of	16-bit words, and therefore should be used
     only to read color	index values.  lrectread fills an array	of 32-bit
     words.  Based on the current pixmode, lrectread can return	pixels of 1,
     2,	4, 8, 12, 16, 24, or 32	bits each.  Use	lrectread to read packed RGB
     or	RGBA values, color index values, or z values.




									Page 1






lrectread(3G)							 lrectread(3G)



     pixmode greatly affects the operation of lrectread, and has no effect on
     the operation of rectread.	 By default, lrectread returns 32-bit pixels
     in	the format used	by cpack.  Different pixel sizes, framebuffer shifts,
     scan patterns through the framebuffer, and	offsets	through	memory,	can
     all be specified using pixmode

     rectread and lrectread leave the current character	position
     unpredictable.

SEE ALSO    [Toc]    [Back]

      
      
     cpack, drawmode, lrectwrite, pixmode, readsource

NOTES    [Toc]    [Back]

     These routines are	available only in immediate mode.

     On	IRIS-4D	GT and GTX models, returned bits that do not correspond	to
     valid bitplanes are undefined.  Other models return zero in these bits.

     On	IRIS-4D	GT, GTX, XS, XS24, XZ, Elan, Extreme and VGX models, rectread
     performance will suffer if	x2 - x1	+ 1 is odd, or if parray is not	32-bit
     word aligned.

     Due to the	write-back nature of the R4000 cache, sproc/m_fork processes
     should avoid accesses to cache lines (128 Bytes) to which a pixel read is
     currently in progress.

     The size of the array passed to lrectread is limited to the size of the
     screen.

BUGS    [Toc]    [Back]

     On	IRIS-4D	GT and GTX models, when	reading	pixels from the	PUPMODE
     planes, the returned bits are shifted up by two bits.

     IRIS-4D VGX and VGXT require that both |x2-x1+1| and |y2-y1+1| be less
     than 2048.


									PPPPaaaaggggeeee 2222
[ Back ]
 Similar pages
Name OS Title
rectwrite IRIX draws a rectangular array of pixels into the frame buffer
lrectwrite IRIX draws a rectangular array of pixels into the frame buffer
readdisplay IRIX reads a rectangular screen region, returning displayed pixel colors in a packed RGB format.
DtMmdbFreeHandleList HP-UX frees memory used by a DtMmdbHandle array
if_freenameindex Tru64 Free dynamic memory allocated to the array of interface names and indexes
rectf IRIX fills a rectangular area
rect IRIX outlines a rectangular region
viewport IRIX allocates a rectangular area of the window for an image
scrmask IRIX defines a rectangular screen clipping mask
rectzoom IRIX specifies the zoom for rectangular pixel copies and writes
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service