[][src]Trait rgx::core::Canvas

pub trait Canvas {
    type Color;
    fn clear(
        &self,
        color: Self::Color,
        device: &mut Device,
        encoder: &mut CommandEncoder
    );
fn fill(
        &self,
        buf: &[Self::Color],
        device: &mut Device,
        encoder: &mut CommandEncoder
    );
fn transfer(
        &self,
        buf: &[Self::Color],
        w: u32,
        h: u32,
        r: Rect<i32>,
        device: &mut Device,
        encoder: &mut CommandEncoder
    );
fn blit(
        &self,
        from: Rect<f32>,
        dst: Rect<f32>,
        encoder: &mut CommandEncoder
    ); }

Canvas

Associated Types

type Color

Loading content...

Required methods

fn clear(
    &self,
    color: Self::Color,
    device: &mut Device,
    encoder: &mut CommandEncoder
)

fn fill(
    &self,
    buf: &[Self::Color],
    device: &mut Device,
    encoder: &mut CommandEncoder
)

fn transfer(
    &self,
    buf: &[Self::Color],
    w: u32,
    h: u32,
    r: Rect<i32>,
    device: &mut Device,
    encoder: &mut CommandEncoder
)

fn blit(&self, from: Rect<f32>, dst: Rect<f32>, encoder: &mut CommandEncoder)

Loading content...

Implementors

impl Canvas for Framebuffer[src]

type Color = Bgra8

impl Canvas for Texture[src]

type Color = Rgba8

Loading content...