pub struct Paint {
pub kind: Kind,
pub stops: Vec<Stop>,
pub repeat: bool,
pub period: f32,
}Fields§
§kind: Kind§stops: Vec<Stop>sorted by at, never empty.
repeat: boolthe gradient tiles: one period spans period name-widths.
period: f32Implementations§
Source§impl Paint
impl Paint
Sourcepub fn from_heatsync(spec: &Value) -> Option<Paint>
pub fn from_heatsync(spec: &Value) -> Option<Paint>
heatsync paint spec: the fill block’s first drawable layer, else
base. None for specs with nothing a terminal can show.
Sourcepub fn from_7tv(p: &Value) -> Option<Paint>
pub fn from_7tv(p: &Value) -> Option<Paint>
7TV paint object (function, stops[{at,color}], angle, repeat,
shape, solid color). image paints and empty ones → None.
Trait Implementations§
impl StructuralPartialEq for Paint
Auto Trait Implementations§
impl Forget for Paint
impl Freeze for Paint
impl Move 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