ImmutableLinearGradientBrush
struct · ferroui-base · v0.5.0
struct ImmutableLinearGradientBrush
A brush that draws with a linear gradient.
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.
from_stops
fn from_stops(gradient_stops: &[ImmutableGradientStop]) -> Self
Creates a fully opaque brush with the given stops and default values for everything else.
from_brush
fn from_brush(source: &LinearGradientBrush) -> Self
Creates an immutable copy of source.
start_point
fn start_point(self: &Self) -> RelativePoint
The start point for the gradient.
end_point
fn end_point(self: &Self) -> RelativePoint
The end point for the gradient.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeClassDefaultsBorrow<T>BorrowMut<T>CloneToUninitInto<U>From<T>TryInto<U>TryFrom<U>ReceiverAnyToOwnedErasedDestructorIntoEitherCloneDerefIBrushIGradientBrushIImmutableBrushILinearGradientBrush
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.