Enum svgtypes::FilterValue
source · pub enum FilterValue<'a> {
Blur(Length),
DropShadow {
color: Option<Color>,
dx: Length,
dy: Length,
std_dev: Length,
},
Brightness(f64),
Contrast(f64),
Grayscale(f64),
HueRotate(Angle),
Invert(f64),
Opacity(f64),
Sepia(f64),
Saturate(f64),
Url(&'a str),
}Expand description
Representation of the <filter-function> | <url> type.
Note that Length values in this enum do not contain % values.
They are disallowed by the spec.
Variants§
Blur(Length)
Cannot be negative and/or have a percentage units.
DropShadow
Fields
Brightness(f64)
Normalized value. Cannot be negative.
Contrast(f64)
Normalized value. Cannot be negative.
Grayscale(f64)
Normalized value. Cannot be negative.
HueRotate(Angle)
Invert(f64)
Normalized value. Cannot be negative.
Opacity(f64)
Normalized value. Cannot be negative.
Sepia(f64)
Normalized value. Cannot be negative.
Saturate(f64)
Normalized value. Cannot be negative.
Url(&'a str)
Cannot be empty.
Trait Implementations§
source§impl<'a> Clone for FilterValue<'a>
impl<'a> Clone for FilterValue<'a>
source§fn clone(&self) -> FilterValue<'a>
fn clone(&self) -> FilterValue<'a>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl<'a> Debug for FilterValue<'a>
impl<'a> Debug for FilterValue<'a>
source§impl<'a> PartialEq<FilterValue<'a>> for FilterValue<'a>
impl<'a> PartialEq<FilterValue<'a>> for FilterValue<'a>
source§fn eq(&self, other: &FilterValue<'a>) -> bool
fn eq(&self, other: &FilterValue<'a>) -> bool
This method tests for
self and other values to be equal, and is used
by ==.