Struct bdf::Glyph [] [src]

pub struct Glyph {
    // some fields omitted
}

A font glyph.

Methods

impl Glyph
[src]

fn new<T: Into<String>>(name: T, codepoint: char) -> Self

Creates a new glyph with the given name and codepoint.

fn validate(&self) -> bool

Validates the definition.

fn name(&self) -> &str

Gets the name.

fn set_name<T: Into<String>>(&mut self, name: T)

Sets the name.

fn codepoint(&self) -> char

Gets the codepoint.

fn set_codepoint(&mut self, codepoint: char)

Sets the codepoint.

fn direction(&self) -> Direction

Gets the direction.

fn set_direction(&mut self, direction: Direction)

Sets the direction.

fn scalable_width(&self) -> Option<&(u32, u32)>

Gets the scalable width.

fn set_scalable_width(&mut self, value: Option<(u32, u32)>)

Sets the scalable width.

fn device_width(&self) -> Option<&(u32, u32)>

Gets the device width.

fn set_device_width(&mut self, value: Option<(u32, u32)>)

Sets the device width.

fn alternate_scalable_width(&self) -> Option<&(u32, u32)>

Gets the alternate scalable width.

fn set_alternate_scalable_width(&mut self, value: Option<(u32, u32)>)

Sets the alternate scalable width.

fn alternate_device_width(&self) -> Option<&(u32, u32)>

Gets the alternate device width.

fn set_alternate_device_width(&mut self, value: Option<(u32, u32)>)

Sets the alternate device width.

fn vector(&self) -> Option<&(u32, u32)>

Gets the offset vector.

fn set_vector(&mut self, value: Option<(u32, u32)>)

Sets the offset vector.

fn bounds(&self) -> &BoundingBox

Gets the bounds.

fn set_bounds(&mut self, bounds: BoundingBox)

Sets the bounds.

fn map(&self) -> &Bitmap

Gets the bitmap.

fn set_map(&mut self, map: Bitmap)

Sets the bitmap.

fn pixels(&self) -> PixelIter

Create an iterator over the pixels which will yield ((x, y), value).

Methods from Deref<Target=Bitmap>

fn width(&self) -> u32

Gets the width.

fn height(&self) -> u32

Gets the height.

fn get(&self, x: u32, y: u32) -> bool

Gets a bit from the map.

fn set(&mut self, x: u32, y: u32, value: bool)

Sets a bit of the map.

Trait Implementations

impl Debug for Glyph
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl Default for Glyph
[src]

fn default() -> Self

Returns the "default value" for a type. Read more

impl Deref for Glyph
[src]

type Target = Bitmap

The resulting type after dereferencing

fn deref(&self) -> &Bitmap

The method called to dereference a value

impl DerefMut for Glyph
[src]

fn deref_mut(&mut self) -> &mut Bitmap

The method called to mutably dereference a value