pub enum GradientKind {
Linear {
angle: Radians,
},
LinearCorner {
right: bool,
bottom: bool,
},
Radial {
circle: bool,
size: GradientSize,
x: Percentage,
y: Percentage,
},
Conic {
from: Radians,
x: Percentage,
y: Percentage,
},
}Expand description
The geometry of a gradient.
Variants§
Linear
Along a line at angle (CSS: 0 points up, a quarter turn right).
LinearCorner
Toward a corner (to top right): the angle follows the box’s
shape (see GradientKind::linear_angle).
Fields
Radial
Out from a center.
Fields
§
size: GradientSizeEnding shape size.
§
x: PercentageCenter, as a fraction of the width.
§
y: PercentageCenter, as a fraction of the height.
Conic
Around a center, starting at from.
Fields
§
x: PercentageCenter, as a fraction of the width.
§
y: PercentageCenter, as a fraction of the height.
Implementations§
Source§impl GradientKind
impl GradientKind
Trait Implementations§
Source§impl Clone for GradientKind
impl Clone for GradientKind
impl Copy for GradientKind
Source§impl Debug for GradientKind
impl Debug for GradientKind
Source§impl PartialEq for GradientKind
impl PartialEq for GradientKind
impl StructuralPartialEq for GradientKind
Auto Trait Implementations§
impl Forget for GradientKind
impl Freeze for GradientKind
impl Move for GradientKind
impl RefUnwindSafe for GradientKind
impl Send for GradientKind
impl Sync for GradientKind
impl Unpin for GradientKind
impl UnsafeUnpin for GradientKind
impl UnwindSafe for GradientKind
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