Struct rasterize::Layer [−][src]
pub struct Layer<C> { /* fields omitted */ }
Implementations
impl<C: Default + Copy> Layer<C>
[src]
impl<C: Default + Copy> Layer<C>
[src]pub fn new(bbox: BBox, color: Option<C>) -> Self
[src]
pub fn empty() -> Self
[src]
pub fn x(&self) -> i32
[src]
pub fn y(&self) -> i32
[src]
pub fn translate(self, dx: i32, dy: i32) -> Self
[src]
pub fn compose<CF, CO>(&mut self, other: &Layer<CO>, compose: CF) where
CO: Default + Copy,
CF: Fn(C, CO) -> C,
[src]
CO: Default + Copy,
CF: Fn(C, CO) -> C,
Trait Implementations
impl<C> Image for Layer<C>
[src]
impl<C> Image for Layer<C>
[src]type Pixel = C
Pixel type
fn shape(&self) -> Shape
[src]
fn data(&self) -> &[Self::Pixel]
[src]
fn size(&self) -> Size
[src]
fn width(&self) -> usize
[src]
fn height(&self) -> usize
[src]
fn get(&self, row: usize, col: usize) -> Option<&Self::Pixel>
[src]
fn as_ref(&self) -> ImageRef<'_, Self::Pixel>
[src]
fn iter(&self) -> ImageIter<'_, Self::Pixel>ⓘ
[src]
fn write_ppm<W>(&self, out: W) -> Result<(), Error> where
W: Write,
Self::Pixel: Color,
Self: Sized,
[src]
W: Write,
Self::Pixel: Color,
Self: Sized,
fn write_bmp<W>(&self, out: W) -> Result<(), Error> where
W: Write,
Self::Pixel: Color,
Self: Sized,
[src]
W: Write,
Self::Pixel: Color,
Self: Sized,
impl<C> ImageMut for Layer<C>
[src]
impl<C> ImageMut for Layer<C>
[src]fn data_mut(&mut self) -> &mut [Self::Pixel]
[src]
fn get_mut(&mut self, row: usize, col: usize) -> Option<&mut Self::Pixel>
[src]
fn as_mut(&mut self) -> ImageMutRef<'_, Self::Pixel>
[src]
fn clear(&mut self) where
Self::Pixel: Default,
[src]
Self::Pixel: Default,
fn iter_mut(&mut self) -> ImageMutIter<'_, Self::Pixel>ⓘNotable traits for ImageMutIter<'a, P>
impl<'a, P> Iterator for ImageMutIter<'a, P> type Item = &'a mut P;
[src]
Notable traits for ImageMutIter<'a, P>
impl<'a, P> Iterator for ImageMutIter<'a, P> type Item = &'a mut P;
Auto Trait Implementations
impl<C> RefUnwindSafe for Layer<C> where
C: RefUnwindSafe,
impl<C> RefUnwindSafe for Layer<C> where
C: RefUnwindSafe,
impl<C> UnwindSafe for Layer<C> where
C: UnwindSafe,
impl<C> UnwindSafe for Layer<C> where
C: UnwindSafe,