pub struct LineElement {
pub color: Option<ThemeColor>,
pub linewidth_pt: Option<Length>,
pub linetype: Option<Arc<[LinetypeStep]>>,
pub cap: Option<Cap>,
pub join: Option<Join>,
}Expand description
Stroke styling — colour, width, dash pattern, cap, join.
Every field is Option<...> so an override can set just the
fields it cares about, with the rest cascading through the
parent chain. After cascading, callers fall through to
line_concrete_defaults for any remaining Nones.
Fields§
§color: Option<ThemeColor>Stroke colour.
linewidth_pt: Option<Length>Stroke width. Resolves against the inherited parent’s resolved
linewidth — Rel(2.0) = twice the parent.
linetype: Option<Arc<[LinetypeStep]>>Dash pattern. Empty = solid stroke. Reuses the same
LinetypeStep machinery the geom layer already ships.
cap: Option<Cap>Line end cap.
join: Option<Join>Line join.
Implementations§
Source§impl LineElement
impl LineElement
Trait Implementations§
Source§impl Clone for LineElement
impl Clone for LineElement
Source§fn clone(&self) -> LineElement
fn clone(&self) -> LineElement
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LineElement
impl Debug for LineElement
Source§impl Default for LineElement
impl Default for LineElement
Source§fn default() -> LineElement
fn default() -> LineElement
Returns the “default value” for a type. Read more
Source§impl PartialEq for LineElement
impl PartialEq for LineElement
impl StructuralPartialEq for LineElement
Auto Trait Implementations§
impl Freeze for LineElement
impl RefUnwindSafe for LineElement
impl Send for LineElement
impl Sync for LineElement
impl Unpin for LineElement
impl UnsafeUnpin for LineElement
impl UnwindSafe for LineElement
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
impl<T> Brush for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.