FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    ImmutableLinearGradientBrush

    struct · ferroui-base · v0.5.0

    struct ImmutableLinearGradientBrush
    

    A brush that draws with a linear gradient.

    View source

    Members

    new

    fn new(gradient_stops: &[ImmutableGradientStop], opacity: f64, transform: Option<Rc<ImmutableTransform>>, transform_origin: Option<RelativePoint>, spread_method: GradientSpreadMethod, start_point: Option<RelativePoint>, end_point: Option<RelativePoint>, relative_transform: Option<Rc<ImmutableTransform>>) -> Self
    

    Creates a brush. transform_origin defaults to the top left corner, start_point to the top left and end_point to the bottom right.

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

    Creates an immutable copy of source.

    Source

    start_point

    fn start_point(self: &Self) -> RelativePoint
    

    The start point for the gradient.

    Source

    end_point

    fn end_point(self: &Self) -> RelativePoint
    

    The end point for the gradient.

    Source

    Trait implementations

    Availability

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