pub struct TextStylePatch {Show 14 fields
pub font_family: Option<Option<String>>,
pub font_size: Option<f32>,
pub fill: Option<Paint>,
pub line_height: Option<f32>,
pub letter_spacing: Option<f32>,
pub font_weight: Option<u16>,
pub align: Option<TextAlign>,
pub max_width: Option<f32>,
pub position: Option<Vec2>,
pub anchor: Option<Vec2>,
pub strokes: Option<Vec<TextStroke>>,
pub shadows: Option<Vec<TextShadow>>,
pub background: Option<Option<TextBackground>>,
pub animators: Option<Vec<TextAnimator>>,
}Expand description
Changes to a TextStyle. Each field set replaces the base’s whole value (lists are not
merged); a field left out keeps the base’s.
Fields§
§font_family: Option<Option<String>>The family; null draws from the fallback order alone.
font_size: Option<f32>See TextStyle::font_size.
fill: Option<Paint>See TextStyle::fill.
line_height: Option<f32>§letter_spacing: Option<f32>§font_weight: Option<u16>§align: Option<TextAlign>See TextStyle::align.
max_width: Option<f32>See TextStyle::max_width.
position: Option<Vec2>See TextStyle::position.
anchor: Option<Vec2>See TextStyle::anchor.
strokes: Option<Vec<TextStroke>>See TextStyle::strokes.
shadows: Option<Vec<TextShadow>>See TextStyle::shadows.
background: Option<Option<TextBackground>>The box behind each line; null removes the base’s.
animators: Option<Vec<TextAnimator>>See TextStyle::animators.
Implementations§
Trait Implementations§
Source§impl Clone for TextStylePatch
impl Clone for TextStylePatch
Source§impl Debug for TextStylePatch
impl Debug for TextStylePatch
Source§impl Default for TextStylePatch
impl Default for TextStylePatch
Source§impl<'de> Deserialize<'de> for TextStylePatch
impl<'de> Deserialize<'de> for TextStylePatch
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for TextStylePatch
impl PartialEq for TextStylePatch
Source§impl Serialize for TextStylePatch
impl Serialize for TextStylePatch
impl StructuralPartialEq for TextStylePatch
Auto Trait Implementations§
impl Freeze for TextStylePatch
impl RefUnwindSafe for TextStylePatch
impl Send for TextStylePatch
impl Sync for TextStylePatch
impl Unpin for TextStylePatch
impl UnsafeUnpin for TextStylePatch
impl UnwindSafe for TextStylePatch
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