Trait animate::ImageExt[][src]

pub trait ImageExt: 'static {
    fn set_bytes(
        &self,
        data: &Bytes,
        pixel_format: PixelFormat,
        width: u32,
        height: u32,
        row_stride: u32
    ) -> Result<(), Error>; }

Trait containing all Image methods.

Implementors

Image

Required methods

fn set_bytes(
    &self,
    data: &Bytes,
    pixel_format: PixelFormat,
    width: u32,
    height: u32,
    row_stride: u32
) -> Result<(), Error>
[src]

Sets the image data stored inside a glib::Bytes to be displayed by self.

If the image data was successfully loaded, the self 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 glib::Bytes is copied in texture memory, and no additional reference is acquired on the data.

data

the image data, as a glib::Bytes

pixel_format

the Cogl pixel format of the image data

width

the width of the image data

height

the height of the image data

row_stride

the length of each row inside data

Returns

true if the image data was successfully loaded, and false otherwise.

Loading content...

Implementors

impl<O: IsA<Image>> ImageExt for O[src]

Loading content...