Struct embedded_graphics::style::Style [−][src]
pub struct Style<P: PixelColor> { pub fill_color: Option<P>, pub stroke_color: Option<P>, pub stroke_width: u8, }
Style properties for an object
Fields
fill_color: Option<P>
Fill colour of the object
Has no effect for fonts
stroke_color: Option<P>
Stroke (border/line) color of the object
For fonts, this is the foreground colour of the text
stroke_width: u8
Stroke width
Set the stroke width for an object. Has no effect on fonts.
Methods
impl<P> Style<P> where
P: PixelColor,
[src]
impl<P> Style<P> where
P: PixelColor,
pub fn with_stroke(stroke_color: P) -> Self
[src]
pub fn with_stroke(stroke_color: P) -> Self
Create a new style with a given stroke value and defaults for everything else
Trait Implementations
impl<P: Debug + PixelColor> Debug for Style<P>
[src]
impl<P: Debug + PixelColor> Debug for Style<P>
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<P: Copy + PixelColor> Copy for Style<P>
[src]
impl<P: Copy + PixelColor> Copy for Style<P>
impl<P: Clone + PixelColor> Clone for Style<P>
[src]
impl<P: Clone + PixelColor> Clone for Style<P>
fn clone(&self) -> Style<P>
[src]
fn clone(&self) -> Style<P>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl<P> Default for Style<P> where
P: PixelColor,
[src]
impl<P> Default for Style<P> where
P: PixelColor,