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).
![]() | 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. |
Type | Name | Description |
---|---|---|
GR_DRAW_ID | id | The ID of the drawable to red pixel data from. |
GR_COORD | x | The X coordinate of the read rectangle, relative to the drawable. |
GR_COORD | y | The Y coordinate of the read rectangle, relative to the drawable. |
GR_SIZE | width | The width of the read rectangle, relative to the drawable. |
GR_SIZE | height | The height of the read rectangle, relative to the drawable. |
GR_PIXELVAL* | pixels | Pointer to a caller supplied area of memory to read the pixel data into. |