Enum pixels_graphics_lib::prelude::TextSize
source · pub enum TextSize {
Small,
Normal,
Large,
}
Expand description
TextSize is used to set the size and positioning in pixels of text
Variants§
Implementations§
source§impl TextSize
impl TextSize
pub fn measure(&self, text: &str, wrapping: WrappingStrategy) -> (usize, usize)
sourcepub const fn get_spacing(&self) -> usize
pub const fn get_spacing(&self) -> usize
Returns the spacing between letters in pixels
pub const fn get_px_ascii(&self, code: u8) -> &[bool]
sourcepub const fn px_to_cols(&self, px: usize) -> usize
pub const fn px_to_cols(&self, px: usize) -> usize
Converts pixels to columns
Trait Implementations§
source§impl PartialEq<TextSize> for TextSize
impl PartialEq<TextSize> for TextSize
impl Copy for TextSize
impl Eq for TextSize
impl StructuralEq for TextSize
impl StructuralPartialEq for TextSize
Auto Trait Implementations§
impl RefUnwindSafe for TextSize
impl Send for TextSize
impl Sync for TextSize
impl Unpin for TextSize
impl UnwindSafe for TextSize
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<R, P> ReadPrimitive<R> for Pwhere
R: Read + ReadEndian<P>,
P: Default,
impl<R, P> ReadPrimitive<R> for Pwhere R: Read + ReadEndian<P>, P: Default,
source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian()
.