pub struct TextStyle {
pub span_style: SpanStyle,
pub paragraph_style: ParagraphStyle,
}Fields§
§span_style: SpanStyle§paragraph_style: ParagraphStyleImplementations§
Source§impl TextStyle
impl TextStyle
pub fn new(span_style: SpanStyle, paragraph_style: ParagraphStyle) -> Self
pub fn from_span_style(span_style: SpanStyle) -> Self
pub fn from_paragraph_style(paragraph_style: ParagraphStyle) -> Self
pub fn merge(&self, other: &TextStyle) -> TextStyle
pub fn plus(&self, other: &TextStyle) -> TextStyle
pub fn to_span_style(&self) -> SpanStyle
pub fn to_paragraph_style(&self) -> ParagraphStyle
pub fn platform_style(&self) -> Option<PlatformTextStyle>
pub fn with_platform_style( self, platform_style: Option<PlatformTextStyle>, ) -> Self
pub fn resolve_font_size(&self, default_size: f32) -> f32
pub fn resolve_line_height( &self, default_size: f32, natural_line_height: f32, ) -> f32
pub fn resolve_letter_spacing(&self, default_size: f32) -> f32
pub fn resolve_text_color(&self, default_color: Color) -> Color
pub fn measurement_hash(&self) -> u64
Trait Implementations§
impl StructuralPartialEq for TextStyle
Auto Trait Implementations§
impl Freeze for TextStyle
impl RefUnwindSafe for TextStyle
impl Send for TextStyle
impl Sync for TextStyle
impl Unpin for TextStyle
impl UnsafeUnpin for TextStyle
impl UnwindSafe for TextStyle
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