Struct Gradient
pub struct Gradient<'a> { /* private fields */ }Expand description
Gradient specification combining colors and interpolation settings.
This type corresponds to the C++ SkGradient class and encapsulates
all parameters needed to define a gradient’s appearance.
Note: This is a lightweight wrapper around Colors and Interpolation.
The actual C++ SkGradient object is constructed on-demand when creating shaders.
Implementations§
§impl<'a> Gradient<'a>
impl<'a> Gradient<'a>
pub fn new( colors: Colors<'a>, interpolation: impl Into<Interpolation>, ) -> Gradient<'a>
pub fn colors(&self) -> &Colors<'a>
pub fn interpolation(&self) -> &Interpolation
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Gradient<'a>
impl<'a> RefUnwindSafe for Gradient<'a>
impl<'a> Send for Gradient<'a>
impl<'a> Sync for Gradient<'a>
impl<'a> Unpin for Gradient<'a>
impl<'a> UnwindSafe for Gradient<'a>
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