pub struct LineStyle {
pub width: f64,
pub cap: LineCap,
pub join: LineJoin,
pub dash: DashPattern,
pub opacity: f64,
pub shadow: Option<Shadow>,
pub color: Color,
}Expand description
The line style of a shape: its width, its caps, its joins, and its dash pattern.
Fields§
§width: f64The line width, in pixels.
cap: LineCapHow the ends of an open stroke are drawn.
join: LineJoinHow the corners between segments are drawn.
dash: DashPatternThe dash pattern applied along the stroke.
opacity: f64The opacity of the stroke, from 0.0 to 1.0.
shadow: Option<Shadow>The shadow cast by the stroke.
color: ColorThe colour of the stroke.
Implementations§
Source§impl LineStyle
Inherent implementation of LineStyle.
impl LineStyle
Inherent implementation of LineStyle.
Sourcepub fn geometry(&self) -> StrokeStyle
pub fn geometry(&self) -> StrokeStyle
Sourcepub fn dash_for(dash_type: LineDashType, width: f64) -> DashPattern
pub fn dash_for(dash_type: LineDashType, width: f64) -> DashPattern
Source§impl LineStyle
impl LineStyle
pub fn get_width(&self) -> f64
pub fn get_mut_width(&mut self) -> &mut f64
pub fn set_width(&mut self, val: f64) -> &mut Self
pub fn get_cap(&self) -> &LineCap
pub fn get_mut_cap(&mut self) -> &mut LineCap
pub fn set_cap(&mut self, val: LineCap) -> &mut Self
pub fn get_join(&self) -> &LineJoin
pub fn get_mut_join(&mut self) -> &mut LineJoin
pub fn set_join(&mut self, val: LineJoin) -> &mut Self
pub fn get_dash(&self) -> &DashPattern
pub fn get_mut_dash(&mut self) -> &mut DashPattern
pub fn set_dash(&mut self, val: DashPattern) -> &mut Self
pub fn get_opacity(&self) -> f64
pub fn get_mut_opacity(&mut self) -> &mut f64
pub fn set_opacity(&mut self, val: f64) -> &mut Self
pub fn get_color(&self) -> &Color
pub fn get_mut_color(&mut self) -> &mut Color
pub fn set_color(&mut self, val: Color) -> &mut Self
Trait Implementations§
impl StructuralPartialEq for LineStyle
Auto Trait Implementations§
impl Freeze for LineStyle
impl RefUnwindSafe for LineStyle
impl Send for LineStyle
impl Sync for LineStyle
impl Unpin for LineStyle
impl UnsafeUnpin for LineStyle
impl UnwindSafe for LineStyle
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