pub struct GradientFill {
pub stops: Vec<GradientStop>,
pub direction: GradientDirection,
}Expand description
Gradient fill definition
Fields§
§stops: Vec<GradientStop>§direction: GradientDirectionImplementations§
Source§impl GradientFill
impl GradientFill
Sourcepub fn linear(
start_color: &str,
end_color: &str,
direction: GradientDirection,
) -> Self
pub fn linear( start_color: &str, end_color: &str, direction: GradientDirection, ) -> Self
Create a simple two-color gradient
Sourcepub fn three_color(
start: &str,
middle: &str,
end: &str,
direction: GradientDirection,
) -> Self
pub fn three_color( start: &str, middle: &str, end: &str, direction: GradientDirection, ) -> Self
Create a three-color gradient
Sourcepub fn with_stop(self, stop: GradientStop) -> Self
pub fn with_stop(self, stop: GradientStop) -> Self
Add a custom stop
Trait Implementations§
Source§impl Clone for GradientFill
impl Clone for GradientFill
Source§fn clone(&self) -> GradientFill
fn clone(&self) -> GradientFill
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 GradientFill
impl RefUnwindSafe for GradientFill
impl Send for GradientFill
impl Sync for GradientFill
impl Unpin for GradientFill
impl UnsafeUnpin for GradientFill
impl UnwindSafe for GradientFill
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