pub struct FontTextStyleBuilder<C: PixelColor> { /* private fields */ }
Expand description
Text style builder for ttf and otf fonts.
Use this builder to create FontTextStyle
s for [Text
].
Implementations§
Source§impl<C: PixelColor> FontTextStyleBuilder<C>
impl<C: PixelColor> FontTextStyleBuilder<C>
Sourcepub fn strikethrough(self) -> Self
pub fn strikethrough(self) -> Self
Enable strikethrough using the text color.
Sourcepub fn text_color(self, text_color: C) -> Self
pub fn text_color(self, text_color: C) -> Self
Set the text color.
Sourcepub fn background_color(self, background_color: C) -> Self
pub fn background_color(self, background_color: C) -> Self
Set the background color.
Sourcepub fn anti_aliasing_color(self, background_color: C) -> Self
pub fn anti_aliasing_color(self, background_color: C) -> Self
Apply antialiasing over a known color.
Sourcepub fn underline_with_color(self, underline_color: C) -> Self
pub fn underline_with_color(self, underline_color: C) -> Self
Enable underline with a custom color.
Sourcepub fn strikethrough_with_color(self, strikethrough_color: C) -> Self
pub fn strikethrough_with_color(self, strikethrough_color: C) -> Self
Enable strikethrough with a custom color.
Sourcepub fn build(self) -> FontTextStyle<C>
pub fn build(self) -> FontTextStyle<C>
Build the text style.
Auto Trait Implementations§
impl<C> Freeze for FontTextStyleBuilder<C>where
C: Freeze,
impl<C> RefUnwindSafe for FontTextStyleBuilder<C>where
C: RefUnwindSafe,
impl<C> !Send for FontTextStyleBuilder<C>
impl<C> !Sync for FontTextStyleBuilder<C>
impl<C> Unpin for FontTextStyleBuilder<C>where
C: Unpin,
impl<C> UnwindSafe for FontTextStyleBuilder<C>where
C: UnwindSafe,
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<T> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Casts the value.
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Casts the value.
Source§impl<T> OverflowingAs for T
impl<T> OverflowingAs for T
Source§fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
Source§fn overflowing_cast_from(src: Src) -> (Dst, bool)
fn overflowing_cast_from(src: Src) -> (Dst, bool)
Casts the value.
Source§impl<T> SaturatingAs for T
impl<T> SaturatingAs for T
Source§fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
Source§fn saturating_cast_from(src: Src) -> Dst
fn saturating_cast_from(src: Src) -> Dst
Casts the value.
Source§impl<T> UnwrappedAs for T
impl<T> UnwrappedAs for T
Source§fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
Casts the value.
Source§impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
Source§fn unwrapped_cast_from(src: Src) -> Dst
fn unwrapped_cast_from(src: Src) -> Dst
Casts the value.
Source§impl<T> WrappingAs for T
impl<T> WrappingAs for T
Source§fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
Source§fn wrapping_cast_from(src: Src) -> Dst
fn wrapping_cast_from(src: Src) -> Dst
Casts the value.