ImmutableRadialGradientBrush
struct · ferroui-base · v0.5.0
struct ImmutableRadialGradientBrush
A brush that draws with a radial gradient.
Members
new
fn new(gradient_stops: &[ImmutableGradientStop], opacity: f64, transform: Option<Rc<ImmutableTransform>>, transform_origin: Option<RelativePoint>, spread_method: GradientSpreadMethod, center: Option<RelativePoint>, gradient_origin: Option<RelativePoint>, radius_x: Option<RelativeScalar>, radius_y: Option<RelativeScalar>, relative_transform: Option<Rc<ImmutableTransform>>) -> Self
Creates a brush. transform_origin defaults to the top left corner,
center and gradient_origin to the center and the radii to one
half, relative.
with_radius
fn with_radius(gradient_stops: &[ImmutableGradientStop], opacity: f64, transform: Option<Rc<ImmutableTransform>>, transform_origin: Option<RelativePoint>, spread_method: GradientSpreadMethod, center: Option<RelativePoint>, gradient_origin: Option<RelativePoint>, radius: f64) -> Self
Creates a brush whose radii are both radius, relative to the
painted area.
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: &RadialGradientBrush) -> Self
Creates an immutable copy of source.
center
fn center(self: &Self) -> RelativePoint
The start point for the gradient.
gradient_origin
fn gradient_origin(self: &Self) -> RelativePoint
The location of the two-dimensional focal point that defines the beginning of the gradient.
radius_x
fn radius_x(self: &Self) -> RelativeScalar
The horizontal radius of the outermost circle of the radial gradient.
radius_y
fn radius_y(self: &Self) -> RelativeScalar
The vertical radius of the outermost circle of the radial gradient.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeClassDefaultsBorrow<T>BorrowMut<T>CloneToUninitInto<U>From<T>TryInto<U>TryFrom<U>ReceiverAnyToOwnedErasedDestructorIntoEitherCloneDerefIBrushIGradientBrushIImmutableBrushIRadialGradientBrush
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.