pub fn new_for_data(
        context: &Context,
        width: i32,
        height: i32,
        format: PixelFormat,
        rowstride: i32,
        data: &[u8],
    ) -> Bitmap {
        unsafe {
            from_glib_full(ffi::cogl_bitmap_new_for_data(
                context.to_glib_none().0,
                width,
                height,
                format.to_glib(),
                rowstride,
                data.to_glib_none().0,
            ))
        }
    }
/// 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 `Bitmap`. This can be used for example with
/// `Framebuffer::read_pixels_into_bitmap` to read data directly
/// into an application buffer with the specified rowstride.
/// ## `context`
/// A `Context`
/// ## `width`
/// The width of the bitmap.
/// ## `height`
/// The height of the bitmap.
/// ## `format`
/// The format of the pixel data.
/// ## `rowstride`
/// The rowstride of the bitmap (the number of bytes from
///  the start of one row of the bitmap to the next).
/// ## `data`
/// A pointer to the data. The bitmap will take ownership of this data.
///
/// # Returns
///
/// A new `Bitmap`.
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 `Bitmap`. This can be used for example with
`Framebuffer::read_pixels_into_bitmap` to read data directly
into an application buffer with the specified rowstride.
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 ` Bitmap ` . This can be used for example with ` Framebuffer :: read_pixels_into_bitmap ` to read data directly into an application buffer with the specified rowstride .
pub fn new_for_data(
        context: &Context,
        width: i32,
        height: i32,
        format: PixelFormat,
        rowstride: i32,
        data: &[u8],
    ) -> Bitmap {
        unsafe {
            from_glib_full(ffi::cogl_bitmap_new_for_data(
                context.to_glib_none().0,
                width,
                height,
                format.to_glib(),
                rowstride,
                data.to_glib_none().0,
            ))
        }
    }
pub fn new_for_data ( context : & Context , width : i32 , height : i32 , format : PixelFormat , rowstride : i32 , data : & [ u8 ] , ) -> Bitmap { unsafe { from_glib_full ( ffi :: cogl_bitmap_new_for_data ( context . to_glib_none ( ) . 0 , width , height , format . to_glib ( ) , rowstride , data . to_glib_none ( ) . 0 , ) ) } }
Creates a bitmap using some existing data.
Creates a bitmap using some existing data .
context
&Context
width
i32
height
i32
format
PixelFormat
rowstride
i32
data
&[u8]
A new `Bitmap`.
A new ` Bitmap ` .
context
&Context
width
i32
height
i32
format
PixelFormat
rowstride
i32
data
&[u8]
`context`
None
`width`
The width of the bitmap.
The width of the bitmap .
`height`
The height of the bitmap.
The height of the bitmap .
`format`
The format of the pixel data.
The format of the pixel data .
`rowstride`
The rowstride of the bitmap (the number of bytes from
the start of one row of the bitmap to the next).
The rowstride of the bitmap ( the number of bytes from the start of one row of the bitmap to the next ) .
`data`
A pointer to the data. The bitmap will take ownership of this data.
A pointer to the data . The bitmap will take ownership of this data .