Sets the image data to be display by this, using rect
to indicate the position and size of
the image data to be set.
If the this does not have any image data set when this function is called, a new texture will be created with the size of the width and height of the rectangle, i.e. calling this function on a newly created Image will be the equivalent of calling set_data.
If the image data was successfully loaded, the this will be invalidated.
In case of error, the error
value will be set, and this function will return false
.
The image data is copied in texture memory.
this |
a Image |
data |
the image data, as an array of bytes |
pixel_format |
the Cogl pixel format of the image data |
rect |
a rectangle indicating the area that should be set |
row_stride |
the length of each row inside |
|