pub struct GenericTextRunProperties { /* private fields */ }Expand description
Generic implementation of TextRunProperties.
Implementations§
Source§impl GenericTextRunProperties
impl GenericTextRunProperties
pub const DEFAULT_FONT_RENDERING_EM_SIZE: f64 = 12.0
Sourcepub fn new(typeface: Typeface) -> Self
pub fn new(typeface: Typeface) -> Self
Creates properties for a typeface with the default em size (12) and nothing else set.
Sourcepub fn with_font_size(typeface: Typeface, font_rendering_em_size: f64) -> Self
pub fn with_font_size(typeface: Typeface, font_rendering_em_size: f64) -> Self
Creates properties for a typeface and em size.
Sourcepub fn with_all(
typeface: Typeface,
font_rendering_em_size: f64,
text_decorations: Option<TextDecorationCollection>,
foreground_brush: Option<Rc<dyn IBrush>>,
background_brush: Option<Rc<dyn IBrush>>,
baseline_alignment: BaselineAlignment,
culture_info: Option<CultureInfo>,
font_features: Option<FontFeatureCollection>,
) -> Self
pub fn with_all( typeface: Typeface, font_rendering_em_size: f64, text_decorations: Option<TextDecorationCollection>, foreground_brush: Option<Rc<dyn IBrush>>, background_brush: Option<Rc<dyn IBrush>>, baseline_alignment: BaselineAlignment, culture_info: Option<CultureInfo>, font_features: Option<FontFeatureCollection>, ) -> Self
Creates properties with every value specified.
Trait Implementations§
Source§impl TextRunProperties for GenericTextRunProperties
impl TextRunProperties for GenericTextRunProperties
Source§fn font_rendering_em_size(&self) -> f64
fn font_rendering_em_size(&self) -> f64
Em size of font used to format and display text.
Source§fn text_decorations(&self) -> Option<&TextDecorationCollection>
fn text_decorations(&self) -> Option<&TextDecorationCollection>
Run text decorations.
Source§fn font_features(&self) -> Option<&FontFeatureCollection>
fn font_features(&self) -> Option<&FontFeatureCollection>
Optional features of used font.
Source§fn baseline_alignment(&self) -> BaselineAlignment
fn baseline_alignment(&self) -> BaselineAlignment
Run vertical box alignment.
Source§fn culture_info(&self) -> Option<&CultureInfo>
fn culture_info(&self) -> Option<&CultureInfo>
Run text culture.
Source§fn cached_glyph_typeface(&self) -> Rc<GlyphTypeface>
fn cached_glyph_typeface(&self) -> Rc<GlyphTypeface>
The glyph typeface of
TextRunProperties::typeface. Read moreAuto Trait Implementations§
impl !Freeze for GenericTextRunProperties
impl !RefUnwindSafe for GenericTextRunProperties
impl !Send for GenericTextRunProperties
impl !Sync for GenericTextRunProperties
impl !UnwindSafe for GenericTextRunProperties
impl Unpin for GenericTextRunProperties
impl UnsafeUnpin for GenericTextRunProperties
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> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
The static constructor of a type: work done once per thread, after
the properties of the type are registered and before its first
instance exists (class handlers,
affects_render, metadata
overrides). Read more