Struct embedded_graphics::style::Style
source · pub struct Style<P: PixelColor> {
pub fill_color: Option<P>,
pub stroke_color: Option<P>,
pub stroke_width: u8,
}Expand description
Style properties for an object
Fields
fill_color: Option<P>Fill colour of the object
For fonts, this is the background colour of the text
stroke_color: Option<P>Stroke (border/line) color of the object
For fonts, this is the foreground colour of the text
stroke_width: u8Stroke width
Set the stroke width for an object. Has no effect on fonts.
Implementations
sourceimpl<P> Style<P>where
P: PixelColor,
impl<P> Style<P>where
P: PixelColor,
sourcepub fn with_stroke(stroke_color: P) -> Self
pub fn with_stroke(stroke_color: P) -> Self
Create a new style with a given stroke value and defaults for everything else
Trait Implementations
sourceimpl<P: Clone + PixelColor> Clone for Style<P>
impl<P: Clone + PixelColor> Clone for Style<P>
sourceimpl<P: Debug + PixelColor> Debug for Style<P>
impl<P: Debug + PixelColor> Debug for Style<P>
sourceimpl<P> Default for Style<P>where
P: PixelColor,
impl<P> Default for Style<P>where
P: PixelColor,
impl<P: Copy + PixelColor> Copy for Style<P>
Auto Trait Implementations
impl<P> RefUnwindSafe for Style<P>where
P: RefUnwindSafe,
impl<P> Send for Style<P>where
P: Send,
impl<P> Sync for Style<P>where
P: Sync,
impl<P> Unpin for Style<P>where
P: Unpin,
impl<P> UnwindSafe for Style<P>where
P: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more