Constructor
CoglBitmapnew_for_data
Declaration [src]
CoglBitmap*
cogl_bitmap_new_for_data (
CoglContext* context,
int width,
int height,
CoglPixelFormat format,
int rowstride,
uint8_t* data
)
Description [src]
Creates a bitmap using some existing data. The data is not copied
so the application must keep the buffer alive for the lifetime of the CoglBitmap. This can be used for example with
cogl_framebuffer_read_pixels_into_bitmap() to read data directly
into an application buffer with the specified rowstride.
Parameters
context-
Type:
CoglContextA
CoglContext.The data is owned by the caller of the function. width-
Type:
intThe width of the bitmap.
height-
Type:
intThe height of the bitmap.
format-
Type:
CoglPixelFormatThe format of the pixel data.
rowstride-
Type:
intThe rowstride of the bitmap (the number of bytes from the start of one row of the bitmap to the next).
data-
Type: An array of
uint8_tA pointer to the data. The bitmap will take ownership of this data.
The called function takes ownership of the data, and is responsible for freeing it.
Return value
Type: CoglBitmap
A new CoglBitmap.
| The caller of the function takes ownership of the data, and is responsible for freeing it. |