pub trait Blur {
// Required methods
fn bokeh_blur(
&mut self,
radius: f64,
param_set: &KernelParamSet<'_>,
gamma: f64,
);
fn bokeh_blur_with_mask<'a>(
&mut self,
mask: impl IntoIterator<Item = &'a bool>,
radius: f64,
param_set: &KernelParamSet<'_>,
gamma: f64,
);
}
Expand description
A trait that allows the blurring of images
Required Methods§
Sourcefn bokeh_blur(
&mut self,
radius: f64,
param_set: &KernelParamSet<'_>,
gamma: f64,
)
fn bokeh_blur( &mut self, radius: f64, param_set: &KernelParamSet<'_>, gamma: f64, )
Blurs the image using an approximation of a disc-shaped kernel to produce a Bokeh lens effect.
The image is blurred by a disc-shaped kernel with radius radius
,
built from components corresponding to param_set
. The exposure can be
modified using gamma
, set to 1.0
for no change.
Sourcefn bokeh_blur_with_mask<'a>(
&mut self,
mask: impl IntoIterator<Item = &'a bool>,
radius: f64,
param_set: &KernelParamSet<'_>,
gamma: f64,
)
fn bokeh_blur_with_mask<'a>( &mut self, mask: impl IntoIterator<Item = &'a bool>, radius: f64, param_set: &KernelParamSet<'_>, gamma: f64, )
Blurs the selected parts of an image using an approximation of a disc-shaped kernel to produce a Bokeh lens effect.
Takes a mask
of the same length as the image where true
’s correspond
to the convolved image and false
’s corresponsed to the original.
The image is blurred by a disc-shaped kernel with radius radius
,
built from components corresponding to param_set
. The exposure can be
modified using gamma
, set to 1.0
for no change.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.