pub struct Shading {
pub kind: ShadingKind,
pub stops: Vec<(f64, Rgb, f64)>,
pub extend: (bool, bool),
}Expand description
a gradient for Canvas::shade and Canvas::fill_shading
Fields§
§kind: ShadingKind§stops: Vec<(f64, Rgb, f64)>(t in 0..=1 ascending, colour, alpha 0..=1); at least one stop. Stops with a NaN t are dropped, t is clamped to 0..=1 and the stops sorted by it (stable: two stops at the same t make a hard edge); a NaN alpha is opaque
extend: (bool, bool)paint beyond t < 0 / t > 1 with the end colours (PDF /Extend), default (true, true)
Implementations§
Trait Implementations§
impl StructuralPartialEq for Shading
Auto Trait Implementations§
impl Forget for Shading
impl Freeze for Shading
impl Move for Shading
impl RefUnwindSafe for Shading
impl Send for Shadingwhere
RawVecInner: Send,
impl Sync for Shadingwhere
RawVecInner: Sync,
impl Unpin for Shading
impl UnsafeUnpin for Shading
impl UnwindSafe for Shadingwhere
RawVecInner: UnwindSafe,
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