Type Alias style::values::computed::image::Gradient

source ·
pub type Gradient = GenericGradient<LineDirection, LengthPercentage, NonNegativeLength, NonNegativeLengthPercentage, Position, Angle, AngleOrPercentage, Color>;
Expand description

Computed values for a CSS gradient. https://drafts.csswg.org/css-images/#gradients

Aliased Type§

enum Gradient {
    Linear {
        direction: LineDirection,
        color_interpolation_method: ColorInterpolationMethod,
        items: OwnedSlice<GenericGradientItem<GenericColor<Percentage>, LengthPercentage>>,
        flags: GradientFlags,
        compat_mode: GradientCompatMode,
    },
    Radial {
        shape: GenericEndingShape<NonNegative<CSSPixelLength>, NonNegative<LengthPercentage>>,
        position: GenericPosition<LengthPercentage, LengthPercentage>,
        color_interpolation_method: ColorInterpolationMethod,
        items: OwnedSlice<GenericGradientItem<GenericColor<Percentage>, LengthPercentage>>,
        flags: GradientFlags,
        compat_mode: GradientCompatMode,
    },
    Conic {
        angle: Angle,
        position: GenericPosition<LengthPercentage, LengthPercentage>,
        color_interpolation_method: ColorInterpolationMethod,
        items: OwnedSlice<GenericGradientItem<GenericColor<Percentage>, AngleOrPercentage>>,
        flags: GradientFlags,
    },
}

Variants§

§

Linear

A linear gradient.

Fields

§direction: LineDirection

Line direction

§color_interpolation_method: ColorInterpolationMethod

Method to use for color interpolation.

§items: OwnedSlice<GenericGradientItem<GenericColor<Percentage>, LengthPercentage>>

The color stops and interpolation hints.

§flags: GradientFlags

State flags for the gradient.

§compat_mode: GradientCompatMode

Compatibility mode.

§

Radial

A radial gradient.

Fields

§position: GenericPosition<LengthPercentage, LengthPercentage>

Center of gradient

§color_interpolation_method: ColorInterpolationMethod

Method to use for color interpolation.

§items: OwnedSlice<GenericGradientItem<GenericColor<Percentage>, LengthPercentage>>

The color stops and interpolation hints.

§flags: GradientFlags

State flags for the gradient.

§compat_mode: GradientCompatMode

Compatibility mode.

§

Conic

A conic gradient.

Fields

§angle: Angle

Start angle of gradient

§position: GenericPosition<LengthPercentage, LengthPercentage>

Center of gradient

§color_interpolation_method: ColorInterpolationMethod

Method to use for color interpolation.

§items: OwnedSlice<GenericGradientItem<GenericColor<Percentage>, AngleOrPercentage>>

The color stops and interpolation hints.

§flags: GradientFlags

State flags for the gradient.