pub struct PaletteStroke {
pub width: WorldPx,
pub color: Swatch,
}Expand description
A stroke described by a world-space width plus a Swatch — a width and a
colour, before either has a unit or a value. The renderer resolves the
swatch to a color (and scales the width by zoom) at draw time. Construct from
a (width, Base) or (width, Swatch) tuple, which wraps the literal width as
a WorldPx; use PaletteStroke::NONE for no stroke.
Fields§
§width: WorldPx§color: SwatchImplementations§
Source§impl PaletteStroke
impl PaletteStroke
Sourcepub const NONE: PaletteStroke
pub const NONE: PaletteStroke
A zero-width, transparent stroke (draws nothing).
Trait Implementations§
Source§impl Clone for PaletteStroke
impl Clone for PaletteStroke
Source§fn clone(&self) -> PaletteStroke
fn clone(&self) -> PaletteStroke
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for PaletteStroke
Auto Trait Implementations§
impl Freeze for PaletteStroke
impl RefUnwindSafe for PaletteStroke
impl Send for PaletteStroke
impl Sync for PaletteStroke
impl Unpin for PaletteStroke
impl UnsafeUnpin for PaletteStroke
impl UnwindSafe for PaletteStroke
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> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more