Enum zng_view_api::display_list::FilterOp
source · pub enum FilterOp {
Blur(f32, f32),
Brightness(f32),
Contrast(f32),
Grayscale(f32),
HueRotate(f32),
Invert(f32),
Opacity(FrameValue<f32>),
Saturate(f32),
Sepia(f32),
DropShadow {
offset: Vector2D<f32, Px>,
color: Rgba,
blur_radius: f32,
},
ColorMatrix([f32; 20]),
Flood(Rgba),
}
Expand description
Represents one of the filters applied to a stacking context.
Variants§
Blur(f32, f32)
Blur, width and height in pixels.
Brightness(f32)
Brightness, in [0..=1] range.
Contrast(f32)
Contrast, in [0..=1] range.
Grayscale(f32)
Grayscale, in [0..=1] range.
HueRotate(f32)
Hue shift, in degrees.
Invert(f32)
Invert, in [0..=1] range.
Opacity(FrameValue<f32>)
Opacity, in [0..=1] range, can be bound.
Saturate(f32)
Saturation, in [0..=1] range.
Sepia(f32)
Sepia, in [0..=1] range.
DropShadow
Pixel perfect shadow.
Fields
ColorMatrix([f32; 20])
Custom filter.
The color matrix is in the format of SVG color matrix, [0..5] is the first matrix row.
Flood(Rgba)
Fill with color.
Trait Implementations§
source§impl<'de> Deserialize<'de> for FilterOp
impl<'de> Deserialize<'de> for FilterOp
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq for FilterOp
impl PartialEq for FilterOp
impl Copy for FilterOp
impl StructuralPartialEq for FilterOp
Auto Trait Implementations§
impl Freeze for FilterOp
impl RefUnwindSafe for FilterOp
impl Send for FilterOp
impl Sync for FilterOp
impl Unpin for FilterOp
impl UnwindSafe for FilterOp
Blanket Implementations§
source§impl<T> AnyVarValue for Twhere
T: VarValue,
impl<T> AnyVarValue for Twhere
T: VarValue,
source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Access to mut
dyn Any
methods.source§fn clone_boxed(&self) -> Box<dyn AnyVarValue>
fn clone_boxed(&self) -> Box<dyn AnyVarValue>
Clone the value.
source§fn clone_boxed_var(&self) -> Box<dyn AnyVar>
fn clone_boxed_var(&self) -> Box<dyn AnyVar>
Clone the value into a new boxed
LocalVar<Self>
.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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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