Struct embedded_graphics::image::Image1BPP[][src]

pub struct Image1BPP<'a> {
    pub offset: Coord,
    // some fields omitted
}

1 bit per pixel image

Fields

Image offset in pixels from screen origin (0,0)

Trait Implementations

impl<'a> Debug for Image1BPP<'a>
[src]

Formats the value using the given formatter. Read more

impl<'a> Image<'a> for Image1BPP<'a>
[src]

Create a new image with given pixel data, width and height

impl<'a> IntoIterator for &'a Image1BPP<'a>
[src]

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

Creates an iterator from a value. Read more

impl<'a> Drawable for Image1BPP<'a>
[src]

impl<'a> Transform for Image1BPP<'a>
[src]

Translate the image from its current position to a new position by (x, y) pixels, returning a new Image1BPP. For a mutating transform, see translate_mut.


// 8px x 1px test image
let image = Image1BPP::new(&[ 0xff ], 8, 1);
let moved = image.translate(Coord::new(25, 30));

assert_eq!(image.offset, Coord::new(0, 0));
assert_eq!(moved.offset, Coord::new(25, 30));

Translate the image from its current position to a new position by (x, y) pixels.


let mut image = Image1BPP::new(&[ 0xff ], 8, 1);
image.translate_mut(Coord::new(25, 30));

assert_eq!(image.offset, Coord::new(25, 30));

Auto Trait Implementations

impl<'a> Send for Image1BPP<'a>

impl<'a> Sync for Image1BPP<'a>