FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    ImmutableRadialGradientBrush

    struct · ferroui-base · v0.5.0

    struct ImmutableRadialGradientBrush
    

    A brush that draws with a radial gradient.

    View source

    Members

    new

    fn new(gradient_stops: &[ImmutableGradientStop], opacity: f64, transform: Option<Rc<ImmutableTransform>>, transform_origin: Option<RelativePoint>, spread_method: GradientSpreadMethod, center: Option<RelativePoint>, gradient_origin: Option<RelativePoint>, radius_x: Option<RelativeScalar>, radius_y: Option<RelativeScalar>, relative_transform: Option<Rc<ImmutableTransform>>) -> Self
    

    Creates a brush. transform_origin defaults to the top left corner, center and gradient_origin to the center and the radii to one half, relative.

    Source

    with_radius

    fn with_radius(gradient_stops: &[ImmutableGradientStop], opacity: f64, transform: Option<Rc<ImmutableTransform>>, transform_origin: Option<RelativePoint>, spread_method: GradientSpreadMethod, center: Option<RelativePoint>, gradient_origin: Option<RelativePoint>, radius: f64) -> Self
    

    Creates a brush whose radii are both radius, relative to the painted area.

    Source

    from_stops

    fn from_stops(gradient_stops: &[ImmutableGradientStop]) -> Self
    

    Creates a fully opaque brush with the given stops and default values for everything else.

    Source

    from_brush

    fn from_brush(source: &RadialGradientBrush) -> Self
    

    Creates an immutable copy of source.

    Source

    center

    fn center(self: &Self) -> RelativePoint
    

    The start point for the gradient.

    Source

    gradient_origin

    fn gradient_origin(self: &Self) -> RelativePoint
    

    The location of the two-dimensional focal point that defines the beginning of the gradient.

    Source

    radius_x

    fn radius_x(self: &Self) -> RelativeScalar
    

    The horizontal radius of the outermost circle of the radial gradient.

    Source

    radius_y

    fn radius_y(self: &Self) -> RelativeScalar
    

    The vertical radius of the outermost circle of the radial gradient.

    Source

    Trait implementations

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.