pub struct FilterKernel { /* private fields */ }Expand description
Image filter kernel
Implementations§
Source§impl FilterKernel
impl FilterKernel
Sourcepub fn new(filter_type: FilterType, sigma: f32, kernel_size: u32) -> Self
pub fn new(filter_type: FilterType, sigma: f32, kernel_size: u32) -> Self
Create a new filter kernel
Sourcepub fn gaussian_blur(sigma: f32) -> Self
pub fn gaussian_blur(sigma: f32) -> Self
Create a Gaussian blur filter
Sourcepub fn execute(
&self,
device: &GpuDevice,
input: &[u8],
output: &mut [u8],
width: u32,
height: u32,
) -> Result<()>
pub fn execute( &self, device: &GpuDevice, input: &[u8], output: &mut [u8], width: u32, height: u32, ) -> Result<()>
Sourcepub fn filter_type(&self) -> FilterType
pub fn filter_type(&self) -> FilterType
Get the filter type
Sourcepub fn kernel_size(&self) -> u32
pub fn kernel_size(&self) -> u32
Get the kernel size
Auto Trait Implementations§
impl Freeze for FilterKernel
impl RefUnwindSafe for FilterKernel
impl Send for FilterKernel
impl Sync for FilterKernel
impl Unpin for FilterKernel
impl UnsafeUnpin for FilterKernel
impl UnwindSafe for FilterKernel
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more