pub struct SpanInterpolatorPerspLerp { /* private fields */ }Expand description
Linear-interpolation perspective span interpolator.
Port of C++ span_interpolator_persp_lerp<SubpixelShift>.
Transforms only the endpoints and linearly interpolates coordinates
between them using DDA. Faster but less accurate than the exact variant.
Implementations§
Source§impl SpanInterpolatorPerspLerp
impl SpanInterpolatorPerspLerp
pub fn new() -> Self
pub fn new_quad_to_quad(src: &[f64; 8], dst: &[f64; 8]) -> Self
pub fn new_rect_to_quad( x1: f64, y1: f64, x2: f64, y2: f64, quad: &[f64; 8], ) -> Self
pub fn new_quad_to_rect( quad: &[f64; 8], x1: f64, y1: f64, x2: f64, y2: f64, ) -> Self
pub fn quad_to_quad(&mut self, src: &[f64; 8], dst: &[f64; 8])
pub fn rect_to_quad( &mut self, x1: f64, y1: f64, x2: f64, y2: f64, quad: &[f64; 8], )
pub fn quad_to_rect( &mut self, quad: &[f64; 8], x1: f64, y1: f64, x2: f64, y2: f64, )
pub fn is_valid(&self) -> bool
pub fn local_scale(&self, x: &mut i32, y: &mut i32)
pub fn transform(&self, x: &mut f64, y: &mut f64)
pub fn trans_dir(&self) -> &TransPerspective
pub fn trans_inv(&self) -> &TransPerspective
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SpanInterpolatorPerspLerp
impl RefUnwindSafe for SpanInterpolatorPerspLerp
impl Send for SpanInterpolatorPerspLerp
impl Sync for SpanInterpolatorPerspLerp
impl Unpin for SpanInterpolatorPerspLerp
impl UnwindSafe for SpanInterpolatorPerspLerp
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