Enum svgrtypes::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 for FilterValue<'a>
impl<'a> PartialEq for FilterValue<'a>
impl<'a> Copy for FilterValue<'a>
impl<'a> StructuralPartialEq for FilterValue<'a>
Auto Trait Implementations§
impl<'a> Freeze for FilterValue<'a>
impl<'a> RefUnwindSafe for FilterValue<'a>
impl<'a> Send for FilterValue<'a>
impl<'a> Sync for FilterValue<'a>
impl<'a> Unpin for FilterValue<'a>
impl<'a> UnwindSafe for FilterValue<'a>
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)