struct Jiggler<'a, C, D>{
points: &'a [Point<C>],
out_points: &'a mut [Point<D>],
}
Fields§
§points: &'a [Point<C>]
§out_points: &'a mut [Point<D>]
Implementations§
Source§impl<C, D> Jiggler<'_, C, D>
impl<C, D> Jiggler<'_, C, D>
Sourcefn shift(&mut self, range: RangeInclusive<usize>, ref_ix: usize) -> Option<()>
fn shift(&mut self, range: RangeInclusive<usize>, ref_ix: usize) -> Option<()>
Shift the coordinates of all points in the specified range using the
difference given by the point at ref_ix
.
Modeled after the FreeType implementation: https://github.com/freetype/freetype/blob/bbfcd79eacb4985d4b68783565f4b494aa64516b/src/truetype/ttgxvar.c#L3776
Sourcefn interpolate(
&mut self,
range: RangeInclusive<usize>,
ref_points: RefPoints,
) -> Option<()>
fn interpolate( &mut self, range: RangeInclusive<usize>, ref_points: RefPoints, ) -> Option<()>
Interpolate the coordinates of all points in the specified range using
ref1_ix
and ref2_ix
as the reference point indices.
Modeled after the FreeType implementation: https://github.com/freetype/freetype/blob/bbfcd79eacb4985d4b68783565f4b494aa64516b/src/truetype/ttgxvar.c#L3813
For details on the algorithm, see: https://learn.microsoft.com/en-us/typography/opentype/spec/gvar#inferred-deltas-for-un-referenced-point-numbers
Auto Trait Implementations§
impl<'a, C, D> Freeze for Jiggler<'a, C, D>
impl<'a, C, D> RefUnwindSafe for Jiggler<'a, C, D>where
C: RefUnwindSafe,
D: RefUnwindSafe,
impl<'a, C, D> Send for Jiggler<'a, C, D>
impl<'a, C, D> Sync for Jiggler<'a, C, D>
impl<'a, C, D> Unpin for Jiggler<'a, C, D>
impl<'a, C, D> !UnwindSafe for Jiggler<'a, C, D>
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