Struct buffer_graphics_lib::text::format::TextFormat
source · pub struct TextFormat { /* private fields */ }
Expand description
Characters be drawn be at idx * char_width, idx * char_height
Implementations§
source§impl TextFormat
impl TextFormat
pub const fn new( wrap_at: WrappingStrategy, size: TextSize, color: Color, positioning: Positioning ) -> Self
pub const fn new_with_spacing( wrap_at: WrappingStrategy, size: TextSize, color: Color, char_height: isize, char_width: isize, positioning: Positioning ) -> Self
source§impl TextFormat
impl TextFormat
pub fn wrapping(&self) -> WrappingStrategy
pub fn size(&self) -> TextSize
pub fn color(&self) -> Color
pub fn line_spacing(&self) -> isize
pub fn letter_spacing(&self) -> isize
pub fn positioning(&self) -> Positioning
pub fn with_color(&self, color: Color) -> Self
Trait Implementations§
source§impl Clone for TextFormat
impl Clone for TextFormat
source§fn clone(&self) -> TextFormat
fn clone(&self) -> TextFormat
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for TextFormat
impl Debug for TextFormat
source§impl Default for TextFormat
impl Default for TextFormat
source§impl From<(Color, TextSize, Positioning)> for TextFormat
impl From<(Color, TextSize, Positioning)> for TextFormat
source§impl From<(Color, TextSize, WrappingStrategy)> for TextFormat
impl From<(Color, TextSize, WrappingStrategy)> for TextFormat
source§impl From<(Color, TextSize, WrappingStrategy, Positioning)> for TextFormat
impl From<(Color, TextSize, WrappingStrategy, Positioning)> for TextFormat
source§fn from(
(color, size, wrap_at, positioning): (Color, TextSize, WrappingStrategy, Positioning)
) -> Self
fn from( (color, size, wrap_at, positioning): (Color, TextSize, WrappingStrategy, Positioning) ) -> Self
Converts to this type from the input type.
source§impl From<(Color, TextSize, WrappingStrategy, isize)> for TextFormat
impl From<(Color, TextSize, WrappingStrategy, isize)> for TextFormat
source§impl From<(Color, TextSize, WrappingStrategy, isize, isize)> for TextFormat
impl From<(Color, TextSize, WrappingStrategy, isize, isize)> for TextFormat
source§impl From<(Color, TextSize, WrappingStrategy, isize, isize, Positioning)> for TextFormat
impl From<(Color, TextSize, WrappingStrategy, isize, isize, Positioning)> for TextFormat
source§fn from(
(color, size, wrap_at, char_height, char_width, positioning): (Color, TextSize, WrappingStrategy, isize, isize, Positioning)
) -> Self
fn from( (color, size, wrap_at, char_height, char_width, positioning): (Color, TextSize, WrappingStrategy, isize, isize, Positioning) ) -> Self
Converts to this type from the input type.
source§impl From<Color> for TextFormat
impl From<Color> for TextFormat
source§impl PartialEq<TextFormat> for TextFormat
impl PartialEq<TextFormat> for TextFormat
source§fn eq(&self, other: &TextFormat) -> bool
fn eq(&self, other: &TextFormat) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for TextFormat
impl StructuralEq for TextFormat
impl StructuralPartialEq for TextFormat
Auto Trait Implementations§
impl RefUnwindSafe for TextFormat
impl Send for TextFormat
impl Sync for TextFormat
impl Unpin for TextFormat
impl UnwindSafe for TextFormat
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