ImmutableGradientBrush
struct · ferroui-base · v0.5.0
struct ImmutableGradientBrush
The data shared by all immutable gradient brushes.
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.
from_brush
fn from_brush(source: &GradientBrush) -> Self
Creates an immutable copy of the gradient data of source.
gradient_stops
fn gradient_stops(self: &Self) -> &[Rc<dyn IGradientStop>]
The brush's gradient stops.
opacity
fn opacity(self: &Self) -> f64
The opacity of the brush.
transform
fn transform(self: &Self) -> Option<Rc<dyn ITransform>>
The transform of the brush.
transform_origin
fn transform_origin(self: &Self) -> RelativePoint
The transform origin of the brush.
spread_method
fn spread_method(self: &Self) -> GradientSpreadMethod
The brush's spread method.
relative_transform
fn relative_transform(self: &Self) -> Option<Rc<dyn ITransform>>
The transform of the brush, relative to the bounds of the painted area.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeClassDefaultsBorrow<T>BorrowMut<T>CloneToUninitInto<U>From<T>TryInto<U>TryFrom<U>AnyToOwnedErasedDestructorIntoEitherClone
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.