Struct fdg_img::style::PaletteColor
source · pub struct PaletteColor<P>(_, _)
where
P: Palette;
Expand description
A color in the given palette
Implementations§
source§impl<P> PaletteColor<P>where
P: Palette,
impl<P> PaletteColor<P>where P: Palette,
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 for PaletteColor<P>where
P: Clone + Palette,
impl<P> Clone for PaletteColor<P>where P: Clone + Palette,
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> Color for PaletteColor<P>where
P: Palette,
impl<P> Color for PaletteColor<P>where P: Palette,
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 for PaletteColor<P>where
P: Default + Palette,
impl<P> Default for PaletteColor<P>where P: Default + Palette,
source§fn default() -> PaletteColor<P>
fn default() -> PaletteColor<P>
Returns the “default value” for a type. Read more
source§impl<P> PartialEq<PaletteColor<P>> for PaletteColor<P>where
P: PartialEq<P> + Palette,
impl<P> PartialEq<PaletteColor<P>> for PaletteColor<P>where P: PartialEq<P> + Palette,
source§fn eq(&self, other: &PaletteColor<P>) -> bool
fn eq(&self, other: &PaletteColor<P>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl<P> Copy for PaletteColor<P>where P: Copy + Palette,
impl<P> Eq for PaletteColor<P>where P: Eq + Palette,
impl<P> StructuralEq for PaletteColor<P>where P: Palette,
impl<P> StructuralPartialEq for PaletteColor<P>where P: Palette,
Auto Trait Implementations§
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<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more