Struct OutlineGlyph
pub struct OutlineGlyph<'a> { /* private fields */ }Expand description
Implementations§
§impl<'a> OutlineGlyph<'a>
impl<'a> OutlineGlyph<'a>
pub fn format(&self) -> OutlineGlyphFormat
pub fn format(&self) -> OutlineGlyphFormat
Returns the underlying source format for this outline.
pub fn has_overlaps(&self) -> Option<bool>
pub fn has_overlaps(&self) -> Option<bool>
Returns a value indicating if the outline may contain overlapping contours or components.
For CFF outlines, returns None since this information is unavailable.
pub fn has_hinting(&self) -> Option<bool>
pub fn has_hinting(&self) -> Option<bool>
Returns a value indicating whether the outline has hinting instructions.
For CFF outlines, returns None since this is unknown prior
to loading the outline.
pub fn draw_memory_size(&self, hinting: Hinting) -> usize
pub fn draw_memory_size(&self, hinting: Hinting) -> usize
Returns the size (in bytes) of the temporary memory required to draw this outline.
This is used to compute the size of the memory buffer required for the
DrawSettings::with_memory method.
The hinting parameter determines which hinting method, if any, will
be used for drawing which has an effect on memory requirements.
The appropriate hinting types are as follows:
| For draw settings | Use hinting |
|---|---|
DrawSettings::unhinted | Hinting::None |
DrawSettings::hinted | Hinting::Embedded |
pub fn draw<'s>(
&self,
settings: impl Into<DrawSettings<'a>>,
pen: &mut impl OutlinePen,
) -> Result<AdjustedMetrics, DrawError>
pub fn draw<'s>( &self, settings: impl Into<DrawSettings<'a>>, pen: &mut impl OutlinePen, ) -> Result<AdjustedMetrics, DrawError>
Draws the outline glyph with the given settings and emits the resulting path commands to the specified pen.
Trait Implementations§
§impl<'a> Clone for OutlineGlyph<'a>
impl<'a> Clone for OutlineGlyph<'a>
§fn clone(&self) -> OutlineGlyph<'a>
fn clone(&self) -> OutlineGlyph<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl<'a> Freeze for OutlineGlyph<'a>
impl<'a> RefUnwindSafe for OutlineGlyph<'a>
impl<'a> Send for OutlineGlyph<'a>
impl<'a> Sync for OutlineGlyph<'a>
impl<'a> Unpin for OutlineGlyph<'a>
impl<'a> UnsafeUnpin for OutlineGlyph<'a>
impl<'a> UnwindSafe for OutlineGlyph<'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
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>
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>
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)
&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)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more