pub struct OutlineGlyph<'a> { /* private fields */ }
Expand description
Implementations§
Source§impl<'a> OutlineGlyph<'a>
impl<'a> OutlineGlyph<'a>
Sourcepub fn format(&self) -> OutlineGlyphFormat
pub fn format(&self) -> OutlineGlyphFormat
Returns the underlying source format for this outline.
Sourcepub 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.
Sourcepub 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.
Sourcepub 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 |
Sourcepub 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§
Source§impl<'a> Clone for OutlineGlyph<'a>
impl<'a> Clone for OutlineGlyph<'a>
Source§fn clone(&self) -> OutlineGlyph<'a>
fn clone(&self) -> OutlineGlyph<'a>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more