Method
StImageContentset_bytes
Declaration [src]
gboolean
st_image_content_set_bytes (
StImageContent* content,
CoglContext* cogl_context,
GBytes* data,
CoglPixelFormat pixel_format,
guint width,
guint height,
guint row_stride,
GError** error
)
Description [src]
Sets the image data stored inside a GBytes
to be displayed by content
.
If the image data was successfully loaded, the content
will be invalidated.
In case of error, the error
value will be set, and this function will return FALSE
.
The image data contained inside the GBytes
is copied in texture memory,
and no additional reference is acquired on the data
.
Parameters
cogl_context
-
Type:
CoglContext
The context to use.
The data is owned by the caller of the method. data
-
Type:
GBytes
The image data, as a
GBytes
.The data is owned by the caller of the method. pixel_format
-
Type:
CoglPixelFormat
The Cogl pixel format of the image data.
width
-
Type:
guint
The width of the image data.
height
-
Type:
guint
The height of the image data.
row_stride
-
Type:
guint
The length of each row inside
data
. error
-
Type:
GError **
The return location for a recoverable error.
The argument can be NULL
.If the return location is not NULL
, then you must initialize it to aNULL
GError*
.The argument will be left initialized to NULL
by the method if there are no errors.In case of error, the argument will be set to a newly allocated GError
; the caller will take ownership of the data, and be responsible for freeing it.