Struct skrifa::color::ColorGlyphCollection
source · pub struct ColorGlyphCollection<'a> { /* private fields */ }
Expand description
Collection of color glyphs.
Implementations§
source§impl<'a> ColorGlyphCollection<'a>
impl<'a> ColorGlyphCollection<'a>
sourcepub fn new(font: &impl TableProvider<'a>) -> Self
pub fn new(font: &impl TableProvider<'a>) -> Self
Creates a new collection of paintable color glyphs for the given font.
sourcepub fn get_with_format(
&self,
glyph_id: GlyphId,
glyph_format: ColorGlyphFormat,
) -> Option<ColorGlyph<'a>>
pub fn get_with_format( &self, glyph_id: GlyphId, glyph_format: ColorGlyphFormat, ) -> Option<ColorGlyph<'a>>
Returns the color glyph representation for the given glyph identifier, given a specific format.
sourcepub fn get(&self, glyph_id: GlyphId) -> Option<ColorGlyph<'a>>
pub fn get(&self, glyph_id: GlyphId) -> Option<ColorGlyph<'a>>
Returns a color glyph representation for the given glyph identifier if available, preferring a COLRv1 representation over a COLRv0 representation.
Trait Implementations§
source§impl<'a> Clone for ColorGlyphCollection<'a>
impl<'a> Clone for ColorGlyphCollection<'a>
source§fn clone(&self) -> ColorGlyphCollection<'a>
fn clone(&self) -> ColorGlyphCollection<'a>
Returns a copy 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 ColorGlyphCollection<'a>
impl<'a> RefUnwindSafe for ColorGlyphCollection<'a>
impl<'a> Send for ColorGlyphCollection<'a>
impl<'a> Sync for ColorGlyphCollection<'a>
impl<'a> Unpin for ColorGlyphCollection<'a>
impl<'a> UnwindSafe for ColorGlyphCollection<'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,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)