pub struct OpixaRenderer { /* private fields */ }Expand description
Renderer that rasterizes outline glyphs into bitmaps.
It applies scan conversion to glyph outlines and composites the resulting coverage onto the target bitmap. Caching is optional and can avoid repeated rasterization of the same glyph at the same size.
Implementations§
Source§impl OpixaRenderer
impl OpixaRenderer
pub fn new() -> Self
pub fn with_cache() -> Self
pub fn with_cache_capacity(capacity: usize) -> Self
pub fn cache_stats(&self) -> Option<GlyphCacheStats>
pub fn cache_hit_rate(&self) -> Option<f64>
pub fn clear_cache(&self)
Trait Implementations§
Source§impl Default for OpixaRenderer
impl Default for OpixaRenderer
Source§impl Renderer for OpixaRenderer
impl Renderer for OpixaRenderer
Source§fn render(
&self,
shaped: &ShapingResult,
font: Arc<dyn FontRef>,
params: &RenderParams,
) -> Result<RenderOutput>
fn render( &self, shaped: &ShapingResult, font: Arc<dyn FontRef>, params: &RenderParams, ) -> Result<RenderOutput>
Convert glyphs to visual output
Source§fn supports_format(&self, format: &str) -> bool
fn supports_format(&self, format: &str) -> bool
Do you understand this output format? Read more
Source§fn clear_cache(&self)
fn clear_cache(&self)
Free up rendering resources
Auto Trait Implementations§
impl Freeze for OpixaRenderer
impl RefUnwindSafe for OpixaRenderer
impl Send for OpixaRenderer
impl Sync for OpixaRenderer
impl Unpin for OpixaRenderer
impl UnsafeUnpin for OpixaRenderer
impl UnwindSafe for OpixaRenderer
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