[−][src]Struct bdf::Glyph
A font glyph.
Implementations
impl Glyph
[src]
pub fn new<T: Into<String>>(name: T, codepoint: char) -> Self
[src]
Creates a new glyph with the given name and codepoint.
pub fn validate(&self) -> bool
[src]
Validates the definition.
pub fn name(&self) -> &str
[src]
Gets the name.
pub fn set_name<T: Into<String>>(&mut self, name: T)
[src]
Sets the name.
pub fn codepoint(&self) -> char
[src]
Gets the codepoint.
pub fn set_codepoint(&mut self, codepoint: char)
[src]
Sets the codepoint.
pub fn direction(&self) -> Direction
[src]
Gets the direction.
pub fn set_direction(&mut self, direction: Direction)
[src]
Sets the direction.
pub fn scalable_width(&self) -> Option<&(u32, u32)>
[src]
Gets the scalable width.
pub fn set_scalable_width(&mut self, value: Option<(u32, u32)>)
[src]
Sets the scalable width.
pub fn device_width(&self) -> Option<&(u32, u32)>
[src]
Gets the device width.
pub fn set_device_width(&mut self, value: Option<(u32, u32)>)
[src]
Sets the device width.
pub fn alternate_scalable_width(&self) -> Option<&(u32, u32)>
[src]
Gets the alternate scalable width.
pub fn set_alternate_scalable_width(&mut self, value: Option<(u32, u32)>)
[src]
Sets the alternate scalable width.
pub fn alternate_device_width(&self) -> Option<&(u32, u32)>
[src]
Gets the alternate device width.
pub fn set_alternate_device_width(&mut self, value: Option<(u32, u32)>)
[src]
Sets the alternate device width.
pub fn vector(&self) -> Option<&(u32, u32)>
[src]
Gets the offset vector.
pub fn set_vector(&mut self, value: Option<(u32, u32)>)
[src]
Sets the offset vector.
pub fn bounds(&self) -> &BoundingBox
[src]
Gets the bounds.
pub fn set_bounds(&mut self, bounds: BoundingBox)
[src]
Sets the bounds.
pub fn map(&self) -> &Bitmap
[src]
Gets the bitmap.
pub fn set_map(&mut self, map: Bitmap)
[src]
Sets the bitmap.
pub fn pixels(&self) -> PixelIter
[src]
Create an iterator over the pixels which will yield ((x, y), value)
.
Methods from Deref<Target = Bitmap>
pub fn width(&self) -> u32
[src]
Gets the width.
pub fn height(&self) -> u32
[src]
Gets the height.
pub fn get(&self, x: u32, y: u32) -> bool
[src]
Gets a bit from the map.
pub fn set(&mut self, x: u32, y: u32, value: bool)
[src]
Sets a bit of the map.
Trait Implementations
impl Debug for Glyph
[src]
impl Default for Glyph
[src]
impl Deref for Glyph
[src]
impl DerefMut for Glyph
[src]
Auto Trait Implementations
impl RefUnwindSafe for Glyph
impl Send for Glyph
impl Sync for Glyph
impl Unpin for Glyph
impl UnwindSafe for Glyph
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,