pub struct OutlinedGlyph { /* private fields */ }
Expand description
A glyph that has been outlined at a scale & position.
Implementations
impl OutlinedGlyph
impl OutlinedGlyph
pub 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.
pub fn draw<O>(&self, o: O) where
O: FnMut(u32, u32, f32),
pub fn draw<O>(&self, o: O) where
O: FnMut(u32, u32, f32),
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 in the range [0.0, 1.0]
indicating how much the glyph covered
that pixel.
Trait Implementations
impl AsRef<Glyph> for OutlinedGlyph
impl AsRef<Glyph> for OutlinedGlyph
impl Clone for OutlinedGlyph
impl Clone for OutlinedGlyph
fn clone(&self) -> OutlinedGlyph
fn clone(&self) -> OutlinedGlyph
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl RefUnwindSafe for OutlinedGlyph
impl Send for OutlinedGlyph
impl Sync for OutlinedGlyph
impl Unpin for OutlinedGlyph
impl UnwindSafe for OutlinedGlyph
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Fr, To> IntoColor<To> for Fr where
To: FromColor<Fr>,
impl<Fr, To> IntoColor<To> for Fr where
To: FromColor<Fr>,
sourcefn into_color(self) -> To
fn into_color(self) -> To
Convert into color
impl<T> Pointable for T
impl<T> Pointable for T
impl<T> SetParameter for T
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
Sets value
as a parameter of self
.