pub struct ConicGradient { /* private fields */ }Expand description
A conic (sweep) gradient: the color changes by angle around the center.
The angle is measured from the +X direction clockwise (in a screen
coordinate system with the Y axis pointing down), position 0 corresponds
to start_angle, and 1 to a full turn. Outside 0..=1 the behavior is
determined by spread (the default SpreadMode::Repeat gives a seamless
ring).
Implementations§
Source§impl ConicGradient
impl ConicGradient
Sourcepub fn new(
center: Point,
start_angle: f32,
stops: Vec<GradientStop>,
spread: SpreadMode,
transform: Transform,
) -> Option<Shader>
pub fn new( center: Point, start_angle: f32, stops: Vec<GradientStop>, spread: SpreadMode, transform: Transform, ) -> Option<Shader>
Creates a conic gradient. start_angle is given in degrees. None if
there are fewer than two stops or the transform matrix is singular.
Trait Implementations§
Source§impl Clone for ConicGradient
impl Clone for ConicGradient
Source§fn clone(&self) -> ConicGradient
fn clone(&self) -> ConicGradient
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ConicGradient
impl RefUnwindSafe for ConicGradient
impl Send for ConicGradient
impl Sync for ConicGradient
impl Unpin for ConicGradient
impl UnsafeUnpin for ConicGradient
impl UnwindSafe for ConicGradient
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more