Trait BitmapBackend

Source
pub trait BitmapBackend: Dimension {
    type DeviceContextType: DeviceContextBackend;
    type CanvasType: CanvasBackend;

    // Required methods
    fn new(
        context: Option<&Self::DeviceContextType>,
        width: usize,
        height: usize,
        pixel_format: BitmapPixelFormat,
        canvas: &Self::CanvasType,
    ) -> Result<Self, GraphicsError>
       where Self: Sized;
    fn from_buffer(
        context: Option<&Self::DeviceContextType>,
        buffer: &[u8],
        pitch: usize,
        width: usize,
        height: usize,
        pixel_format: BitmapPixelFormat,
        canvas: &Self::CanvasType,
    ) -> Result<Self, GraphicsError>
       where Self: Sized;
}

Required Associated Types§

Required Methods§

Source

fn new( context: Option<&Self::DeviceContextType>, width: usize, height: usize, pixel_format: BitmapPixelFormat, canvas: &Self::CanvasType, ) -> Result<Self, GraphicsError>
where Self: Sized,

Source

fn from_buffer( context: Option<&Self::DeviceContextType>, buffer: &[u8], pitch: usize, width: usize, height: usize, pixel_format: BitmapPixelFormat, canvas: &Self::CanvasType, ) -> Result<Self, GraphicsError>
where Self: Sized,

Implementors§