pub struct SpanInterpolatorLinearSubdiv<T = TransAffine> { /* private fields */ }Expand description
Linear span interpolator with subdivision.
Periodically re-transforms coordinates to reduce error accumulation for non-linear transforms used as linear approximations.
Port of C++ span_interpolator_linear_subdiv<Transformer, SubpixelShift>.
Implementations§
Source§impl<T: Transformer> SpanInterpolatorLinearSubdiv<T>
impl<T: Transformer> SpanInterpolatorLinearSubdiv<T>
pub fn new(trans: T, subdiv_shift: u32) -> Self
pub fn new_default(trans: T) -> Self
pub fn transformer(&self) -> &T
pub fn set_transformer(&mut self, trans: T)
pub fn subdiv_shift(&self) -> u32
pub fn set_subdiv_shift(&mut self, shift: u32)
Sourcepub fn begin(&mut self, x: f64, y: f64, len: u32)
pub fn begin(&mut self, x: f64, y: f64, len: u32)
Initialize interpolation for a span starting at (x, y) with len pixels.
Sourcepub fn coordinates(&self, x: &mut i32, y: &mut i32)
pub fn coordinates(&self, x: &mut i32, y: &mut i32)
Get the current transformed coordinates (in subpixel units).
Trait Implementations§
Source§impl<T: Transformer> SpanInterpolator for SpanInterpolatorLinearSubdiv<T>
impl<T: Transformer> SpanInterpolator for SpanInterpolatorLinearSubdiv<T>
Auto Trait Implementations§
impl<T> Freeze for SpanInterpolatorLinearSubdiv<T>where
T: Freeze,
impl<T> RefUnwindSafe for SpanInterpolatorLinearSubdiv<T>where
T: RefUnwindSafe,
impl<T> Send for SpanInterpolatorLinearSubdiv<T>where
T: Send,
impl<T> Sync for SpanInterpolatorLinearSubdiv<T>where
T: Sync,
impl<T> Unpin for SpanInterpolatorLinearSubdiv<T>where
T: Unpin,
impl<T> UnsafeUnpin for SpanInterpolatorLinearSubdiv<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for SpanInterpolatorLinearSubdiv<T>where
T: UnwindSafe,
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