pub enum Fill {
Solid(Color),
Linear {
angle_deg: f32,
stops: Vec<(f32, Color)>,
},
Radial {
radius: f32,
stops: Vec<(f32, Color)>,
},
Conic {
from_deg: f32,
stops: Vec<(f32, Color)>,
},
}Expand description
Fill brush variants for a Visuals rect.
Variants§
Solid(Color)
Single uniform color.
Linear
Linear gradient. angle_deg uses the CSS convention (0 = left->right, 90 = bottom->top, 180 = top->bottom). stops is sorted by ascending offset at parse time.
Fields
Radial
Radial gradient centred at 50% / 50% of the entity rect. radius is normalised to 0..=1 of the rect’s min dimension (1.0 reaches the nearest edge).
Fields
Conic
Conic (sweep) gradient centred at 50% / 50%. from_deg rotates the sweep start using the CSS convention (0 = north, 90 = east).
Implementations§
Trait Implementations§
impl StructuralPartialEq for Fill
Auto Trait Implementations§
impl Freeze for Fill
impl RefUnwindSafe for Fill
impl Send for Fill
impl Sync for Fill
impl Unpin for Fill
impl UnsafeUnpin for Fill
impl UnwindSafe for Fill
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
§fn into_result(self) -> Result<T, RunSystemError>
fn into_result(self) -> Result<T, RunSystemError>
Converts this type into the system output type.