Struct embedded_graphics::fonts::Font6x12[][src]

pub struct Font6x12<'a> {
    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> Debug for Font6x12<'a>
[src]

Formats the value using the given formatter. Read more

impl<'a> Clone for Font6x12<'a>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<'a> Copy for Font6x12<'a>
[src]

impl<'a> Font<'a> for Font6x12<'a>
[src]

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

impl<'a> IntoIterator for &'a Font6x12<'a>
[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> Drawable for Font6x12<'a>
[src]

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

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


let text = Font6x8::render_str("Hello world", 1);
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.


// 8px x 1px test image
let mut text = Font6x12::render_str("Hello world", 1);
text.translate_mut(Coord::new(25, 30));

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

Auto Trait Implementations

impl<'a> Send for Font6x12<'a>

impl<'a> Sync for Font6x12<'a>