Trait glyph_packer::Buffer2d [] [src]

pub trait Buffer2d: Sized {
    type Pixel;
    fn width(&self) -> u32;
    fn height(&self) -> u32;
    fn get(&self, x: u32, y: u32) -> Option<Self::Pixel>;
    fn set(&mut self, x: u32, y: u32, _val: Self::Pixel);

    fn patch<B: Buffer2d<Pixel=Self::Pixel>>(&mut self, x: u32, y: u32, buf: &B) { ... }
    fn patch_rotated<B: Buffer2d<Pixel=Self::Pixel>>(&mut self, x: u32, y: u32, buf: &B) { ... }
    fn dimensions(&self) -> (u32, u32) { ... }
}

Associated Types

type Pixel

Required Methods

fn width(&self) -> u32

fn height(&self) -> u32

fn get(&self, x: u32, y: u32) -> Option<Self::Pixel>

fn set(&mut self, x: u32, y: u32, _val: Self::Pixel)

Provided Methods

fn patch<B: Buffer2d<Pixel=Self::Pixel>>(&mut self, x: u32, y: u32, buf: &B)

fn patch_rotated<B: Buffer2d<Pixel=Self::Pixel>>(&mut self, x: u32, y: u32, buf: &B)

fn dimensions(&self) -> (u32, u32)

Implementors