pub struct PaletteColor<P: Palette>(/* private fields */);
Expand description
A color in the given palette
Implementations§
Source§impl<P: Palette> PaletteColor<P>
impl<P: Palette> PaletteColor<P>
Sourcepub fn pick(idx: usize) -> PaletteColor<P>
pub fn pick(idx: usize) -> PaletteColor<P>
Pick a color from the palette
Trait Implementations§
Source§impl<P: Clone + Palette> Clone for PaletteColor<P>
impl<P: Clone + Palette> Clone for PaletteColor<P>
Source§fn clone(&self) -> PaletteColor<P>
fn clone(&self) -> PaletteColor<P>
Returns a copy 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 moreSource§impl<P: Palette> Color for PaletteColor<P>
impl<P: Palette> Color for PaletteColor<P>
Source§fn to_backend_color(&self) -> BackendColor
fn to_backend_color(&self) -> BackendColor
Normalize this color representation to the backend color
Source§fn to_rgba(&self) -> RGBAColor
fn to_rgba(&self) -> RGBAColor
Convert the color into the RGBA color which is internally used by Plotters
Source§fn filled(&self) -> ShapeStylewhere
Self: Sized,
fn filled(&self) -> ShapeStylewhere
Self: Sized,
Make a filled style form the color
Source§fn stroke_width(&self, width: u32) -> ShapeStylewhere
Self: Sized,
fn stroke_width(&self, width: u32) -> ShapeStylewhere
Self: Sized,
Make a shape style with stroke width from a color
Source§impl<P: Default + Palette> Default for PaletteColor<P>
impl<P: Default + Palette> Default for PaletteColor<P>
Source§fn default() -> PaletteColor<P>
fn default() -> PaletteColor<P>
Returns the “default value” for a type. Read more
impl<P: Copy + Palette> Copy for PaletteColor<P>
impl<P: Eq + Palette> Eq for PaletteColor<P>
impl<P: Palette> StructuralPartialEq for PaletteColor<P>
Auto Trait Implementations§
impl<P> Freeze for PaletteColor<P>
impl<P> RefUnwindSafe for PaletteColor<P>where
P: RefUnwindSafe,
impl<P> Send for PaletteColor<P>where
P: Send,
impl<P> Sync for PaletteColor<P>where
P: Sync,
impl<P> Unpin for PaletteColor<P>where
P: Unpin,
impl<P> UnwindSafe for PaletteColor<P>where
P: 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 8 bytes