FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    ImmutableConicGradientBrush

    struct · ferroui-base · v0.5.0

    struct ImmutableConicGradientBrush
    

    A brush that draws with a sweep 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>, angle: f64, relative_transform: Option<Rc<ImmutableTransform>>) -> Self
    

    Creates a brush. transform_origin defaults to the top left corner and center to the center.

    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: &ConicGradientBrush) -> Self
    

    Creates an immutable copy of source.

    Source

    center

    fn center(self: &Self) -> RelativePoint
    

    The center point for the gradient.

    Source

    angle

    fn angle(self: &Self) -> f64
    

    The starting angle of the gradient's sweep, in degrees.

    Source

    Trait implementations

    Availability

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