Method
CoglFramebufferread_pixels_into_bitmap
Declaration [src]
gboolean
cogl_framebuffer_read_pixels_into_bitmap (
CoglFramebuffer* framebuffer,
int x,
int y,
CoglReadPixelsFlags source,
CoglBitmap* bitmap
)
Description [src]
This reads a rectangle of pixels from the given framebuffer where position (0, 0) is the top left. The pixel at (x, y) is the first read, and a rectangle of pixels with the same size as the bitmap is read right and downwards from that point.
Currently Cogl assumes that the framebuffer is in a premultiplied
format so if the format of bitmap is non-premultiplied it will
convert it. To read the pixel values without any conversion you
should either specify a format that doesn’t use an alpha channel or
use one of the formats ending in PRE.
If bitmap only allows write access, Cogl may use temporary storage to
flip or convert the pixels before writing them to bitmap.
Parameters
x-
Type:
intThe x position to read from.
y-
Type:
intThe y position to read from.
source-
Type:
CoglReadPixelsFlagsIdentifies which auxiliary buffer you want to read (only COGL_READ_PIXELS_COLOR_BUFFER supported currently).
bitmap-
Type:
CoglBitmapThe bitmap to store the results in.
The data is owned by the caller of the method.