Struct StyleMetrics
#[repr(C)]pub struct StyleMetrics<'a> {
pub text_style: &'a Handle<skia_textlayout_TextStyle>,
pub font_metrics: FontMetrics,
}Fields§
§text_style: &'a Handle<skia_textlayout_TextStyle>§font_metrics: FontMetricsFontMetrics contains the following metrics:
- Top distance to reserve above baseline
- Ascent distance to reserve below baseline
- Descent extent below baseline
- Bottom extent below baseline
- Leading distance to add between lines
- AvgCharWidth average character width
- MaxCharWidth maximum character width
- XMin minimum x
- XMax maximum x
- XHeight height of lower-case ‘x’
- CapHeight height of an upper-case letter
- UnderlineThickness underline thickness
- UnderlinePosition underline position relative to baseline
- StrikeoutThickness strikeout thickness
- StrikeoutPosition strikeout position relative to baseline
Implementations§
§impl<'a> StyleMetrics<'a>
impl<'a> StyleMetrics<'a>
pub fn new( style: &'a Handle<skia_textlayout_TextStyle>, metrics: impl Into<Option<FontMetrics>>, ) -> StyleMetrics<'a>
Trait Implementations§
§impl<'a> Clone for StyleMetrics<'a>
impl<'a> Clone for StyleMetrics<'a>
§fn clone(&self) -> StyleMetrics<'a>
fn clone(&self) -> StyleMetrics<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<'a> Freeze for StyleMetrics<'a>
impl<'a> !RefUnwindSafe for StyleMetrics<'a>
impl<'a> Send for StyleMetrics<'a>
impl<'a> Sync for StyleMetrics<'a>
impl<'a> Unpin for StyleMetrics<'a>
impl<'a> !UnwindSafe for StyleMetrics<'a>
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.