[−][src]Struct embedded_graphics::style::TextStyle
Style properties for text.
A TextStyle
can be applied to a Text
object to define how the text is drawn.
Because TextStyle
has the non_exhaustive
attribute, it cannot be created using a struct
literal. To create a TextStyle
, use the text_style!
macro or TextStyleBuilder
.
Fields (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.text_color: Option<C>
Text color.
background_color: Option<C>
Background color.
font: F
Font.
Methods
impl<C, F> TextStyle<C, F> where
C: PixelColor,
F: Font,
[src]
C: PixelColor,
F: Font,
Trait Implementations
impl<C: Clone, F: Clone> Clone for TextStyle<C, F> where
C: PixelColor,
F: Font,
[src]
C: PixelColor,
F: Font,
fn clone(&self) -> TextStyle<C, F>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<C: Copy, F: Copy> Copy for TextStyle<C, F> where
C: PixelColor,
F: Font,
[src]
C: PixelColor,
F: Font,
impl<C: Debug, F: Debug> Debug for TextStyle<C, F> where
C: PixelColor,
F: Font,
[src]
C: PixelColor,
F: Font,
impl<C: Default, F: Default> Default for TextStyle<C, F> where
C: PixelColor,
F: Font,
[src]
C: PixelColor,
F: Font,
impl<C: Eq, F: Eq> Eq for TextStyle<C, F> where
C: PixelColor,
F: Font,
[src]
C: PixelColor,
F: Font,
impl<C: Hash, F: Hash> Hash for TextStyle<C, F> where
C: PixelColor,
F: Font,
[src]
C: PixelColor,
F: Font,
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<C: Ord, F: Ord> Ord for TextStyle<C, F> where
C: PixelColor,
F: Font,
[src]
C: PixelColor,
F: Font,
fn cmp(&self, other: &TextStyle<C, F>) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl<C: PartialEq, F: PartialEq> PartialEq<TextStyle<C, F>> for TextStyle<C, F> where
C: PixelColor,
F: Font,
[src]
C: PixelColor,
F: Font,
fn eq(&self, other: &TextStyle<C, F>) -> bool
[src]
fn ne(&self, other: &TextStyle<C, F>) -> bool
[src]
impl<C: PartialOrd, F: PartialOrd> PartialOrd<TextStyle<C, F>> for TextStyle<C, F> where
C: PixelColor,
F: Font,
[src]
C: PixelColor,
F: Font,
fn partial_cmp(&self, other: &TextStyle<C, F>) -> Option<Ordering>
[src]
fn lt(&self, other: &TextStyle<C, F>) -> bool
[src]
fn le(&self, other: &TextStyle<C, F>) -> bool
[src]
fn gt(&self, other: &TextStyle<C, F>) -> bool
[src]
fn ge(&self, other: &TextStyle<C, F>) -> bool
[src]
impl<C, F> StructuralEq for TextStyle<C, F> where
C: PixelColor,
F: Font,
[src]
C: PixelColor,
F: Font,
impl<C, F> StructuralPartialEq for TextStyle<C, F> where
C: PixelColor,
F: Font,
[src]
C: PixelColor,
F: Font,
Auto Trait Implementations
impl<C, F> Send for TextStyle<C, F> where
C: Send,
F: Send,
C: Send,
F: Send,
impl<C, F> Sync for TextStyle<C, F> where
C: Sync,
F: Sync,
C: Sync,
F: Sync,
impl<C, F> Unpin for TextStyle<C, F> where
C: Unpin,
F: Unpin,
C: Unpin,
F: Unpin,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> Scalar for T where
T: PartialEq<T> + Copy + Any + Debug,
[src]
T: PartialEq<T> + Copy + Any + Debug,
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
SS: SubsetOf<SP>,
fn to_subset(&self) -> Option<SS>
fn is_in_subset(&self) -> bool
unsafe fn to_subset_unchecked(&self) -> SS
fn from_subset(element: &SS) -> SP
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,