#[non_exhaustive]pub enum ImageFilterConfig {
Direct(ImageFilter),
Blur {
sigma_x: f64,
sigma_y: f64,
bounded: bool,
},
Compose {
outer: Rc<ImageFilterConfig>,
inner: Rc<ImageFilterConfig>,
},
}Expand description
A description of an ImageFilter that is resolved against an ImageFilterContext
at paint time.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Direct(ImageFilter)
A configuration that always resolves to the given filter (Dart’s default constructor).
Blur
A Gaussian blur, optionally bounded to the render object’s bounds.
Fields
Compose
outer applied to the result of inner; Dart’s ImageFilterConfig.compose.
Fields
outer: Rc<ImageFilterConfig>The configuration that receives the filtered result of inner.
inner: Rc<ImageFilterConfig>The configuration that receives the original input.
Implementations§
Source§impl ImageFilterConfig
impl ImageFilterConfig
Sourcepub const fn new(filter: ImageFilter) -> ImageFilterConfig
pub const fn new(filter: ImageFilter) -> ImageFilterConfig
Creates a configuration that resolves to filter unchanged.
This is also how a inset_embedder::ColorFilter is wrapped, since Dart’s
ColorFilter is itself a ui.ImageFilter: pass ImageFilter::Color(filter).
Sourcepub const fn blur() -> ImageFilterConfig
pub const fn blur() -> ImageFilterConfig
Creates a blur configuration; Dart’s named arguments are the setters.
Sourcepub fn compose(
outer: ImageFilterConfig,
inner: ImageFilterConfig,
) -> ImageFilterConfig
pub fn compose( outer: ImageFilterConfig, inner: ImageFilterConfig, ) -> ImageFilterConfig
Composes the inner configuration with outer, to combine their effects.
Creates a single ImageFilterConfig that when applied, has the same effect as
subsequently applying inner and outer, i.e. result = outer(inner(source)).
Sourcepub fn sigma_x(self, value: f64) -> ImageFilterConfig
pub fn sigma_x(self, value: f64) -> ImageFilterConfig
Dart ImageFilterConfig.blur(sigmaX:).
Sourcepub fn sigma_y(self, value: f64) -> ImageFilterConfig
pub fn sigma_y(self, value: f64) -> ImageFilterConfig
Dart ImageFilterConfig.blur(sigmaY:).
Sourcepub fn bounded(self, value: bool) -> ImageFilterConfig
pub fn bounded(self, value: bool) -> ImageFilterConfig
Dart ImageFilterConfig.blur(bounded:).
Sourcepub fn resolve(&self, context: ImageFilterContext) -> ImageFilter
pub fn resolve(&self, context: ImageFilterContext) -> ImageFilter
Resolves this configuration into an ImageFilter for the given context.
Sourcepub fn filter(&self) -> Option<&ImageFilter>
pub fn filter(&self) -> Option<&ImageFilter>
The filter this configuration was created from, for a direct configuration.
Sourcepub fn debug_short_description(&self) -> String
pub fn debug_short_description(&self) -> String
A short description for debugging.