[][src]Trait euc::Target

pub trait Target {
type Item: Clone;
    fn size(&self) -> [usize; 2];
unsafe fn set(&mut self, pos: [usize; 2], item: Self::Item);
unsafe fn get(&self, pos: [usize; 2]) -> Self::Item;
fn clear(&mut self, fill: Self::Item); }

Represents a 2-dimensional rendering target that can have pixel data read and written to it.

Associated Types

type Item: Clone

The type of items contained within this target.

Loading content...

Required methods

fn size(&self) -> [usize; 2]

Get the dimensions of the target.

unsafe fn set(&mut self, pos: [usize; 2], item: Self::Item)

Set the item at the specified location in the target to the given item. The validity of the location is not checked, and as such this method is marked unsafe.

unsafe fn get(&self, pos: [usize; 2]) -> Self::Item

Get a copy of the item at the specified location in the target. The validity of the location is not checked, and as such this method is marked unsafe.

fn clear(&mut self, fill: Self::Item)

Clear the target with copies of the specified item.

Loading content...

Implementors

impl<T: Clone> Target for Buffer2d<T>[src]

type Item = T

Loading content...