pub struct TextPaintStyle {Show 13 fields
pub font_family: Option<&'static str>,
pub text_align: TextAlign,
pub font_weight: FontWeight,
pub font_style: FontStyle,
pub text_decoration: TextDecoration,
pub letter_spacing: Px,
pub line_height: Px,
pub text_direction: TextDirection,
pub font_synthesis: FontSynthesis,
pub baseline_shift: BaselineShift,
pub draw_style: DrawStyle,
pub url: Option<Arc<str>>,
pub font_variation_settings: Option<Arc<str>>,
}Expand description
Tunable text properties bundled for ergonomic Default, so a
SceneNode::Text stays { rect, text, color, size, style } and simple
nodes don’t spell out every knob. color and size stay on the variant
because a default for either would silently draw invisible text.
Fields§
§font_family: Option<&'static str>§text_align: TextAlign§font_weight: FontWeight§font_style: FontStyle§text_decoration: TextDecoration§letter_spacing: Px§line_height: Px§text_direction: TextDirection§font_synthesis: FontSynthesisWhether the font renderer may synthesize bold/italic/small-caps.
baseline_shift: BaselineShift§draw_style: DrawStyleFill, outline, or both.
url: Option<Arc<str>>URL for clickable link text.
font_variation_settings: Option<Arc<str>>OpenType font variation settings (e.g. “wght 700, opsz 24”).
Trait Implementations§
Source§impl Clone for TextPaintStyle
impl Clone for TextPaintStyle
Source§impl Debug for TextPaintStyle
impl Debug for TextPaintStyle
Source§impl Default for TextPaintStyle
impl Default for TextPaintStyle
Source§impl PartialEq for TextPaintStyle
impl PartialEq for TextPaintStyle
impl StructuralPartialEq for TextPaintStyle
Auto Trait Implementations§
impl Freeze for TextPaintStyle
impl RefUnwindSafe for TextPaintStyle
impl Send for TextPaintStyle
impl Sync for TextPaintStyle
impl Unpin for TextPaintStyle
impl UnsafeUnpin for TextPaintStyle
impl UnwindSafe for TextPaintStyle
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