FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    ImmutableGradientBrush

    struct · ferroui-base · v0.5.0

    struct ImmutableGradientBrush
    

    The data shared by all immutable gradient brushes.

    View source

    Members

    new

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

    Creates the gradient brush data. transform_origin defaults to the top left corner.

    Source

    from_brush

    fn from_brush(source: &GradientBrush) -> Self
    

    Creates an immutable copy of the gradient data of source.

    Source

    gradient_stops

    fn gradient_stops(self: &Self) -> &[Rc<dyn IGradientStop>]
    

    The brush's gradient stops.

    Source

    opacity

    fn opacity(self: &Self) -> f64
    

    The opacity of the brush.

    Source

    transform

    fn transform(self: &Self) -> Option<Rc<dyn ITransform>>
    

    The transform of the brush.

    Source

    transform_origin

    fn transform_origin(self: &Self) -> RelativePoint
    

    The transform origin of the brush.

    Source

    spread_method

    fn spread_method(self: &Self) -> GradientSpreadMethod
    

    The brush's spread method.

    Source

    relative_transform

    fn relative_transform(self: &Self) -> Option<Rc<dyn ITransform>>
    

    The transform of the brush, relative to the bounds of the painted area.

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • ClassDefaults
    • Borrow<T>
    • BorrowMut<T>
    • CloneToUninit
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Any
    • ToOwned
    • ErasedDestructor
    • IntoEither
    • Clone

    Availability

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