pub struct LinearGradient {
pub start: Point,
pub end: Point,
pub from: Color,
pub to: Color,
}Expand description
A two-stop linear gradient. start and end are relative to the shape’s
rectangle: (0, 0) is its top-left corner and (1, 1) its bottom-right.
Fields§
§start: PointGradient start, relative to the shape’s rectangle.
end: PointGradient end, relative to the shape’s rectangle.
from: ColorColor at start.
to: ColorColor at end.
Implementations§
Source§impl LinearGradient
impl LinearGradient
Sourcepub const fn vertical(from: Color, to: Color) -> LinearGradient
pub const fn vertical(from: Color, to: Color) -> LinearGradient
Top-to-bottom gradient from from to to.
Trait Implementations§
Source§impl Clone for LinearGradient
impl Clone for LinearGradient
Source§fn clone(&self) -> LinearGradient
fn clone(&self) -> LinearGradient
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 moreimpl Copy for LinearGradient
Source§impl Debug for LinearGradient
impl Debug for LinearGradient
Source§impl PartialEq for LinearGradient
impl PartialEq for LinearGradient
impl StructuralPartialEq for LinearGradient
Auto Trait Implementations§
impl Freeze for LinearGradient
impl RefUnwindSafe for LinearGradient
impl Send for LinearGradient
impl Sync for LinearGradient
impl Unpin for LinearGradient
impl UnsafeUnpin for LinearGradient
impl UnwindSafe for LinearGradient
Blanket Implementations§
impl<T> AutoreleaseSafe for Twhere
T: ?Sized,
impl<T> AutoreleaseSafe for Twhere
T: ?Sized,
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