Skip to main content

SpecifiedFilter

Type Alias SpecifiedFilter 

Source
pub type SpecifiedFilter = Filter<Angle, FilterFactor, Length, SimpleShadow, Impossible>;
Expand description

A specified value for a single filter.

Aliased Type§

#[repr(C, u8)]
pub enum SpecifiedFilter { Blur(NonNegative<Length>), Brightness(NonNegative<FilterFactor>), Contrast(NonNegative<FilterFactor>), Grayscale(ZeroToOne<FilterFactor>), HueRotate(Angle), Invert(ZeroToOne<FilterFactor>), Opacity(ZeroToOne<FilterFactor>), Saturate(NonNegative<FilterFactor>), Sepia(ZeroToOne<FilterFactor>), DropShadow(GenericSimpleShadow<Option<Color>, Length, Option<NonNegative<Length>>>), Url(Impossible), }

Variants§

§

Blur(NonNegative<Length>)

blur(<length>)

§

Brightness(NonNegative<FilterFactor>)

brightness(<factor>)

§

Contrast(NonNegative<FilterFactor>)

contrast(<factor>)

§

Grayscale(ZeroToOne<FilterFactor>)

grayscale(<factor>)

§

HueRotate(Angle)

hue-rotate(<angle>)

§

Invert(ZeroToOne<FilterFactor>)

invert(<factor>)

§

Opacity(ZeroToOne<FilterFactor>)

opacity(<factor>)

§

Saturate(NonNegative<FilterFactor>)

saturate(<factor>)

§

Sepia(ZeroToOne<FilterFactor>)

sepia(<factor>)

§

DropShadow(GenericSimpleShadow<Option<Color>, Length, Option<NonNegative<Length>>>)

drop-shadow(...)

§

Url(Impossible)

<url>

Implementations§

Source§

impl Filter

Source

pub fn to_computed_value_without_context(&self) -> Result<ComputedFilter, ()>

Generate the ComputedFilter without Context.

Trait Implementations§

Source§

impl Parse for Filter

Source§

fn parse<'i, 't>( context: &ParserContext<'_>, input: &mut Parser<'i, 't>, ) -> Result<Self, ParseError<'i>>

Parse a value of this type. Read more