GrReadArea()

Name

GrReadArea() -- Read pixel data from a drawable

Synopsis

void GrReadArea ( GR_DRAW_ID id , GR_COORD x , GR_COORD y , GR_SIZE width , GR_SIZE height , GR_PIXELVAL * pixels );

Description

This function reads a rectangle of pixel data from the specified drawable into the caller supplied pixel buffer. The pixel data is read from a rectangular region at position (x, y) of size (width, height).

Note

If the drawable is a window, then the pixel data returned will be pixel values from the appropiate position on the screen. If another window covers the specified window, then the visible window's image will be returned. If the window wid is unmapped or partially outside a window boundary, black pixels will be returned in the nonvisible section of the area.

Parameters

TypeNameDescription
GR_DRAW_IDidThe ID of the drawable to red pixel data from.
GR_COORDxThe X coordinate of the read rectangle, relative to the drawable.
GR_COORDyThe Y coordinate of the read rectangle, relative to the drawable.
GR_SIZEwidthThe width of the read rectangle, relative to the drawable.
GR_SIZEheightThe height of the read rectangle, relative to the drawable.
GR_PIXELVAL*pixelsPointer to a caller supplied area of memory to read the pixel data into.

See Also

GrArea(), GrCopyArea().