pub struct Filter { /* private fields */ }
Expand description
Resampling filter.
Implementations
sourceimpl Filter
impl Filter
sourcepub fn new(kernel: Box<dyn Fn(f32) -> f32>, support: f32) -> Self
pub fn new(kernel: Box<dyn Fn(f32) -> f32>, support: f32) -> Self
Create a new filter.
Examples
use resize::Filter;
fn kernel(x: f32) -> f32 { f32::max(1.0 - x.abs(), 0.0) }
let filter = Filter::new(Box::new(kernel), 1.0);
sourcepub fn new_cubic(b: f32, c: f32) -> Self
👎 Deprecated: use Type enum
pub fn new_cubic(b: f32, c: f32) -> Self
use Type enum
Helper to create Cubic filter with custom B and C parameters.
sourcepub fn new_lanczos(radius: f32) -> Self
👎 Deprecated: use Type enum
pub fn new_lanczos(radius: f32) -> Self
use Type enum
Helper to create Lanczos filter with custom radius.
Auto Trait Implementations
impl !RefUnwindSafe for Filter
impl !Send for Filter
impl !Sync for Filter
impl Unpin for Filter
impl !UnwindSafe for Filter
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more