pub struct StrokeStyle {
pub width: f32,
pub cap: LineCap,
pub join: LineJoin,
pub dash: DashPattern,
}Expand description
The geometric parameters of a stroke.
The colour lives in the paint layer; this struct carries only what the tessellator needs to turn a path into stroke geometry.
Fields§
§width: f32The 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.
Implementations§
Source§impl StrokeStyle
impl StrokeStyle
pub fn get_width(&self) -> f32
pub fn get_mut_width(&mut self) -> &mut f32
pub fn set_width(&mut self, val: f32) -> &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
Trait Implementations§
Source§impl Clone for StrokeStyle
impl Clone for StrokeStyle
Source§impl Debug for StrokeStyle
impl Debug for StrokeStyle
Source§impl PartialEq for StrokeStyle
impl PartialEq for StrokeStyle
impl StructuralPartialEq for StrokeStyle
Auto Trait Implementations§
impl Freeze for StrokeStyle
impl RefUnwindSafe for StrokeStyle
impl Send for StrokeStyle
impl Sync for StrokeStyle
impl Unpin for StrokeStyle
impl UnsafeUnpin for StrokeStyle
impl UnwindSafe for StrokeStyle
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