Enum buffer_graphics_lib::text::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