pub trait GlyphRunBackend<'a>: Sized {
// Required methods
fn atlas_cache(self, enabled: bool) -> Self;
fn fill_glyphs<Glyphs>(self, run: GlyphRun<'a>, glyphs: Glyphs)
where Glyphs: Iterator<Item = Glyph> + Clone;
fn stroke_glyphs<Glyphs>(self, run: GlyphRun<'a>, glyphs: Glyphs)
where Glyphs: Iterator<Item = Glyph> + Clone;
fn render_decoration<Glyphs>(
self,
run: GlyphRun<'a>,
glyphs: Glyphs,
x_range: RangeInclusive<f32>,
baseline_y: f32,
offset: f32,
size: f32,
buffer: f32,
)
where Glyphs: Iterator<Item = Glyph> + Clone;
}Expand description
A backend for glyph run builders.
Required Methods§
Sourcefn atlas_cache(self, enabled: bool) -> Self
fn atlas_cache(self, enabled: bool) -> Self
Enable or disable atlas-backed glyph caching for the glyph run.
Note: Atlas caching is currently highly experimental and not recommended for external use.
Sourcefn fill_glyphs<Glyphs>(self, run: GlyphRun<'a>, glyphs: Glyphs)
fn fill_glyphs<Glyphs>(self, run: GlyphRun<'a>, glyphs: Glyphs)
Fill the given glyph sequence using the configured builder state.
Sourcefn stroke_glyphs<Glyphs>(self, run: GlyphRun<'a>, glyphs: Glyphs)
fn stroke_glyphs<Glyphs>(self, run: GlyphRun<'a>, glyphs: Glyphs)
Stroke the given glyph sequence using the configured builder state.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".