#[non_exhaustive]pub struct PaintStyle {
pub fill: Option<SvgPaint>,
pub stroke: Option<SvgPaint>,
pub stroke_width: Option<Points>,
pub stroke_dasharray: Option<Arc<[Points]>>,
}Expand description
SVG’s paint properties, as CSS has them on any element and inherits
them (fill, stroke, strokeWidth, strokeDasharray; fill-* /
stroke-*): what the shapes a Rust component draws paint with (the
marks of nsh/base/plot), read through a drawing’s
crate::canvas::ViewPaints. Unset values inherit; at the root they
are CSS’s initial values, which the drawing names.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.fill: Option<SvgPaint>fill.
stroke: Option<SvgPaint>stroke.
stroke_width: Option<Points>strokeWidth.
stroke_dasharray: Option<Arc<[Points]>>strokeDasharray: the dashes and gaps, empty for none.
Implementations§
Source§impl PaintStyle
impl PaintStyle
Sourcepub fn inherit(&self, parent: &PaintStyle) -> PaintStyle
pub fn inherit(&self, parent: &PaintStyle) -> PaintStyle
These properties where set, parent’s (the inherited ones) where
not.
Trait Implementations§
Source§impl Clone for PaintStyle
impl Clone for PaintStyle
Source§impl Debug for PaintStyle
impl Debug for PaintStyle
Source§impl Default for PaintStyle
impl Default for PaintStyle
Source§impl PartialEq for PaintStyle
impl PartialEq for PaintStyle
impl StructuralPartialEq for PaintStyle
Auto Trait Implementations§
impl Forget for PaintStyle
impl Freeze for PaintStyle
impl Move for PaintStyle
impl RefUnwindSafe for PaintStyle
impl Send for PaintStyle
impl Sync for PaintStyle
impl Unpin for PaintStyle
impl UnsafeUnpin for PaintStylewhere
*const ArcInner<[Points]> is !null: UnsafeUnpin,
PhantomData<ArcInner<[Points]>>: UnsafeUnpin,
impl UnwindSafe for PaintStyle
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