pub struct SpanImageFilterBase<'a, I> { /* private fields */ }Expand description
Base state for image filter span generators.
Holds a reference to the interpolator and optional filter LUT, plus the subpixel offset (dx, dy) applied to coordinates before filtering.
Port of C++ span_image_filter<Source, Interpolator> (without the source,
which is handled by the concrete span generator).
Implementations§
Source§impl<'a, I> SpanImageFilterBase<'a, I>
impl<'a, I> SpanImageFilterBase<'a, I>
Sourcepub fn new(interpolator: &'a mut I, filter: Option<&'a ImageFilterLut>) -> Self
pub fn new(interpolator: &'a mut I, filter: Option<&'a ImageFilterLut>) -> Self
Create a new base with interpolator, optional filter, and default 0.5 offset.
pub fn interpolator(&self) -> &I
pub fn interpolator_mut(&mut self) -> &mut I
pub fn filter(&self) -> Option<&ImageFilterLut>
pub fn filter_dx_int(&self) -> u32
pub fn filter_dy_int(&self) -> u32
pub fn filter_dx_dbl(&self) -> f64
pub fn filter_dy_dbl(&self) -> f64
Sourcepub fn set_filter_offset(&mut self, dx: f64, dy: f64)
pub fn set_filter_offset(&mut self, dx: f64, dy: f64)
Set the subpixel filter offset.
The offset shifts coordinates before filtering. Default is (0.5, 0.5) which centers the filter kernel on pixel centers.
Sourcepub fn set_filter_offset_uniform(&mut self, d: f64)
pub fn set_filter_offset_uniform(&mut self, d: f64)
Set equal filter offset for both axes.
Sourcepub fn set_filter(&mut self, filter: &'a ImageFilterLut)
pub fn set_filter(&mut self, filter: &'a ImageFilterLut)
Set the filter LUT.
Auto Trait Implementations§
impl<'a, I> Freeze for SpanImageFilterBase<'a, I>
impl<'a, I> RefUnwindSafe for SpanImageFilterBase<'a, I>where
I: RefUnwindSafe,
impl<'a, I> Send for SpanImageFilterBase<'a, I>where
I: Send,
impl<'a, I> Sync for SpanImageFilterBase<'a, I>where
I: Sync,
impl<'a, I> Unpin for SpanImageFilterBase<'a, I>
impl<'a, I> !UnwindSafe for SpanImageFilterBase<'a, I>
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