Struct glyph_brush_layout::ab_glyph::OutlinedGlyph
source · pub struct OutlinedGlyph { /* private fields */ }
Expand description
A glyph that has been outlined at a scale & position.
Implementations§
source§impl OutlinedGlyph
impl OutlinedGlyph
sourcepub fn new(
glyph: Glyph,
outline: Outline,
scale_factor: PxScaleFactor
) -> OutlinedGlyph
pub fn new( glyph: Glyph, outline: Outline, scale_factor: PxScaleFactor ) -> OutlinedGlyph
Constructs an OutlinedGlyph
from the source Glyph
, pixel bounds
& relatively positioned outline curves.
sourcepub fn draw<O>(&self, o: O)
pub fn draw<O>(&self, o: O)
Draw this glyph outline using a pixel & coverage handling function.
The callback will be called for each (x, y)
pixel coordinate inside the bounds
with a coverage value indicating how much the glyph covered that pixel.
A coverage value of 0.0
means the pixel is totally uncoverred by the glyph.
A value of 1.0
or greater means fully coverred.
Trait Implementations§
source§impl AsRef<Glyph> for OutlinedGlyph
impl AsRef<Glyph> for OutlinedGlyph
source§impl Clone for OutlinedGlyph
impl Clone for OutlinedGlyph
source§fn clone(&self) -> OutlinedGlyph
fn clone(&self) -> OutlinedGlyph
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 RefUnwindSafe for OutlinedGlyph
impl Send for OutlinedGlyph
impl Sync for OutlinedGlyph
impl Unpin for OutlinedGlyph
impl UnwindSafe for OutlinedGlyph
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