Struct bitmap_font::TextStyle [−][src]
#[non_exhaustive]pub struct TextStyle<'a> { pub font: &'a BitmapFont<'a>, pub color: BinaryColor, }
Expand description
The equivalent of MonoTextStyle
for BitmapFont
.
Fields (Non-exhaustive)
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.font: &'a BitmapFont<'a>
color: BinaryColor
Implementations
Trait Implementations
type Color = BinaryColor
type Color = BinaryColor
Color type.
fn draw_string<D>(
&self,
text: &str,
pos: Point,
_: Baseline,
target: &mut D
) -> Result<Point, D::Error> where
D: DrawTarget<Color = Self::Color>,
[src]
fn draw_string<D>(
&self,
text: &str,
pos: Point,
_: Baseline,
target: &mut D
) -> Result<Point, D::Error> where
D: DrawTarget<Color = Self::Color>,
[src]Draws a string. Read more
fn draw_whitespace<D>(
&self,
width: u32,
pos: Point,
_: Baseline,
_: &mut D
) -> Result<Point, D::Error> where
D: DrawTarget<Color = Self::Color>,
[src]
fn draw_whitespace<D>(
&self,
width: u32,
pos: Point,
_: Baseline,
_: &mut D
) -> Result<Point, D::Error> where
D: DrawTarget<Color = Self::Color>,
[src]Draws whitespace of the given width. Read more
Returns the text metrics for a string. Read more
Returns the default line height. Read more
Auto Trait Implementations
Blanket Implementations
Mutably borrows from an owned value. Read more
Casts the value.
Casts the value.
Casts the value.
Casts the value.
Casts the value.