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
sourceimpl TextFormat
impl TextFormat
pub fn new(wrap_at: WrappingStrategy, size: TextSize, color: Color) -> Self
pub fn new_with_spacing(
wrap_at: WrappingStrategy,
size: TextSize,
color: Color,
char_height: isize,
char_width: isize
) -> Self
sourceimpl 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 with_color(&self, color: Color) -> Self
Trait Implementations
sourceimpl Clone for TextFormat
impl Clone for TextFormat
sourcefn clone(&self) -> TextFormat
fn clone(&self) -> TextFormat
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for TextFormat
impl Debug for TextFormat
sourceimpl Default for TextFormat
impl Default for TextFormat
sourceimpl From<(Color, TextSize, WrappingStrategy, isize, isize)> for TextFormat
impl From<(Color, TextSize, WrappingStrategy, isize, isize)> for TextFormat
sourceimpl From<(Color, TextSize, WrappingStrategy, isize)> for TextFormat
impl From<(Color, TextSize, WrappingStrategy, isize)> for TextFormat
sourceimpl From<(Color, TextSize, WrappingStrategy)> for TextFormat
impl From<(Color, TextSize, WrappingStrategy)> for TextFormat
sourcefn from((color, size, wrap_at): (Color, TextSize, WrappingStrategy)) -> Self
fn from((color, size, wrap_at): (Color, TextSize, WrappingStrategy)) -> Self
Converts to this type from the input type.
sourceimpl From<(Color, TextSize)> for TextFormat
impl From<(Color, TextSize)> 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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<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,
sourcefn 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()
.
sourcefn read_from_big_endian(read: &mut R) -> Result<Self, Error>
fn read_from_big_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as ReadEndian::read_from_big_endian()
.
sourcefn read_from_native_endian(read: &mut R) -> Result<Self, Error>
fn read_from_native_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as ReadEndian::read_from_native_endian()
.