Type Alias style::values::computed::image::Image

source ·
pub type Image = GenericImage<Gradient, ComputedImageUrl, Color, Percentage, Resolution>;
Expand description

Computed values for an image according to CSS-IMAGES. https://drafts.csswg.org/css-images/#image-values

Aliased Type§

enum Image {
    None,
    Url(ComputedUrl),
    Gradient(Box<GenericGradient<LineDirection, LengthPercentage, NonNegative<CSSPixelLength>, NonNegative<LengthPercentage>, GenericPosition<LengthPercentage, LengthPercentage>, Angle, AngleOrPercentage, GenericColor<Percentage>>>),
    PaintWorklet(PaintWorklet),
    CrossFade(Box<GenericCrossFade<GenericImage<GenericGradient<LineDirection, LengthPercentage, NonNegative<CSSPixelLength>, NonNegative<LengthPercentage>, GenericPosition<LengthPercentage, LengthPercentage>, Angle, AngleOrPercentage, GenericColor<Percentage>>, ComputedUrl, GenericColor<Percentage>, Percentage, Resolution>, GenericColor<Percentage>, Percentage>>),
    ImageSet(Box<GenericImageSet<GenericImage<GenericGradient<LineDirection, LengthPercentage, NonNegative<CSSPixelLength>, NonNegative<LengthPercentage>, GenericPosition<LengthPercentage, LengthPercentage>, Angle, AngleOrPercentage, GenericColor<Percentage>>, ComputedUrl, GenericColor<Percentage>, Percentage, Resolution>, Resolution>>),
}

Variants§

§

None

none variant.

§

Url(ComputedUrl)

A <url()> image.

§

Gradient(Box<GenericGradient<LineDirection, LengthPercentage, NonNegative<CSSPixelLength>, NonNegative<LengthPercentage>, GenericPosition<LengthPercentage, LengthPercentage>, Angle, AngleOrPercentage, GenericColor<Percentage>>>)

A <gradient> image. Gradients are rather large, and not nearly as common as urls, so we box them here to keep the size of this enum sane.

§

PaintWorklet(PaintWorklet)

§

CrossFade(Box<GenericCrossFade<GenericImage<GenericGradient<LineDirection, LengthPercentage, NonNegative<CSSPixelLength>, NonNegative<LengthPercentage>, GenericPosition<LengthPercentage, LengthPercentage>, Angle, AngleOrPercentage, GenericColor<Percentage>>, ComputedUrl, GenericColor<Percentage>, Percentage, Resolution>, GenericColor<Percentage>, Percentage>>)

A <cross-fade()> image. Storing this directly inside of GenericImage increases the size by 8 bytes so we box it here and store images directly inside of cross-fade instead of boxing them there.

§

ImageSet(Box<GenericImageSet<GenericImage<GenericGradient<LineDirection, LengthPercentage, NonNegative<CSSPixelLength>, NonNegative<LengthPercentage>, GenericPosition<LengthPercentage, LengthPercentage>, Angle, AngleOrPercentage, GenericColor<Percentage>>, ComputedUrl, GenericColor<Percentage>, Percentage, Resolution>, Resolution>>)

An image-set() function.

Trait Implementations§