pub struct Render<'a> { /* private fields */ }
Expand description
Builder type for rendering a glyph into an image.
See the module level documentation for detail.
Implementations§
source§impl<'a> Render<'a>
impl<'a> Render<'a>
sourcepub fn new(sources: &'a [Source]) -> Self
pub fn new(sources: &'a [Source]) -> Self
Creates a new builder for configuring rendering using the specified prioritized list of sources.
sourcepub fn format(&mut self, format: Format) -> &mut Self
pub fn format(&mut self, format: Format) -> &mut Self
Specifies the target format for rasterizing an outline. Default is
Format::Alpha
.
sourcepub fn style(&mut self, style: impl Into<Style<'a>>) -> &mut Self
pub fn style(&mut self, style: impl Into<Style<'a>>) -> &mut Self
Specifies the path style to use when rasterizing an outline. Default is
Fill::NonZero
.
sourcepub fn offset(&mut self, offset: Vector) -> &mut Self
pub fn offset(&mut self, offset: Vector) -> &mut Self
Specifies an additional offset to apply when rasterizing an outline.
Default is (0, 0)
.
sourcepub fn transform(&mut self, transform: Option<Transform>) -> &mut Self
pub fn transform(&mut self, transform: Option<Transform>) -> &mut Self
Specifies a transformation matrix to apply when rasterizing an
outline. Default is None
.
sourcepub fn embolden(&mut self, strength: f32) -> &mut Self
pub fn embolden(&mut self, strength: f32) -> &mut Self
Specifies the strength of a faux bold transform to apply when
rasterizing an outline. Default is 0
.
sourcepub fn default_color(&mut self, color: [u8; 4]) -> &mut Self
pub fn default_color(&mut self, color: [u8; 4]) -> &mut Self
Specifies an RGBA color to use when rasterizing layers of a color
outline that do not directly reference a palette color. Default is
[128, 128, 128, 255]
.