pub enum Paint {
Role(ColorRole),
Literal(Color),
Asset(u32),
}Expand description
Every place that takes a colour takes a Paint, so colour is expressed once.
Encoded as one u64: the high 32 bits are the kind, the low 32 bits are the value.
Variants§
Role(ColorRole)
Literal(Color)
Asset(u32)
A registered brush: a gradient, or a picture laid out as a fill.
An id rather than the thing itself, because a list of stops does not fit the two words a modifier has and because a brush outlives the frame that draws it, which is what the asset path already exists for.
Implementations§
Trait Implementations§
impl Copy for Paint
impl Eq for Paint
impl StructuralPartialEq for Paint
Auto Trait Implementations§
impl Freeze for Paint
impl RefUnwindSafe for Paint
impl Send for Paint
impl Sync for Paint
impl Unpin for Paint
impl UnsafeUnpin for Paint
impl UnwindSafe for Paint
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