pub struct SpanInterpolatorTrans<T: Transformer> { /* private fields */ }Expand description
Per-pixel transform span interpolator.
Transforms every single pixel through the given transformer. This is more
accurate than linear interpolation but significantly slower since transform()
is called for every pixel rather than just the span endpoints.
Port of C++ span_interpolator_trans<Transformer, SubpixelShift>.
Implementations§
Source§impl<T: Transformer> SpanInterpolatorTrans<T>
impl<T: Transformer> SpanInterpolatorTrans<T>
pub fn new(trans: T) -> Self
pub fn new_begin(trans: T, x: f64, y: f64, len: u32) -> Self
pub fn transformer(&self) -> &T
pub fn set_transformer(&mut self, trans: T)
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).
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 SpanInterpolatorTrans<T>
impl<T: Transformer> SpanInterpolator for SpanInterpolatorTrans<T>
Auto Trait Implementations§
impl<T> Freeze for SpanInterpolatorTrans<T>where
T: Freeze,
impl<T> RefUnwindSafe for SpanInterpolatorTrans<T>where
T: RefUnwindSafe,
impl<T> Send for SpanInterpolatorTrans<T>where
T: Send,
impl<T> Sync for SpanInterpolatorTrans<T>where
T: Sync,
impl<T> Unpin for SpanInterpolatorTrans<T>where
T: Unpin,
impl<T> UnwindSafe for SpanInterpolatorTrans<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