Struct embedded_graphics::fonts::Font12x16[][src]

pub struct Font12x16<'a, C: PixelColor> {
    pub pos: Coord,
    // some fields omitted
}

Container struct to hold a positioned piece of text

Fields

Top left corner of the text

Trait Implementations

impl<'a, C: Debug + PixelColor> Debug for Font12x16<'a, C>
[src]

Formats the value using the given formatter. Read more

impl<'a, C: Clone + PixelColor> Clone for Font12x16<'a, C>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<'a, C: Copy + PixelColor> Copy for Font12x16<'a, C>
[src]

impl<'a, C> Font<'a, C> for Font12x16<'a, C> where
    C: PixelColor
[src]

Render a string in the implementing font's typeface. Read more

impl<'a, C> IntoIterator for &'a Font12x16<'a, C> where
    C: PixelColor
[src]

Which kind of iterator are we turning this into?

The type of the elements being iterated over.

Creates an iterator from a value. Read more

impl<'a, C> Drawable for Font12x16<'a, C> where
    C: PixelColor
[src]

impl<'a, C> Transform for Font12x16<'a, C> where
    C: PixelColor
[src]

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


let text = Font12x16::render_str("Hello world", 1u8);
let moved = text.translate(Coord::new(25, 30));

assert_eq!(text.pos, Coord::new(0, 0));
assert_eq!(moved.pos, Coord::new(25, 30));

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


let mut text = Font12x16::render_str("Hello world", 1u8);
text.translate_mut(Coord::new(25, 30));

assert_eq!(text.pos, Coord::new(25, 30));

Auto Trait Implementations

impl<'a, C> Send for Font12x16<'a, C> where
    C: Send

impl<'a, C> Sync for Font12x16<'a, C> where
    C: Sync