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 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> 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,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)