Struct floem_peniko::Stroke
source · pub struct Stroke {
pub width: f32,
pub join: Join,
pub miter_limit: f32,
pub start_cap: Cap,
pub end_cap: Cap,
pub dash_pattern: Dashes,
pub dash_offset: f32,
pub scale: bool,
}
Expand description
Describes the visual style of a stroke.
Fields§
§width: f32
Width of the stroke.
join: Join
Style for connecting segments of the stroke.
miter_limit: f32
Limit for miter joins.
start_cap: Cap
Style for capping the beginning of an open subpath.
end_cap: Cap
Style for capping the end of an open subpath.
dash_pattern: Dashes
Lengths of dashes in alternating on/off order.
dash_offset: f32
Offset of the first dash.
scale: bool
True if the stroke width should be affected by the scale of a transform.
Implementations§
source§impl Stroke
impl Stroke
sourcepub fn with_miter_limit(self, limit: f32) -> Self
pub fn with_miter_limit(self, limit: f32) -> Self
Builder method for setting the limit for miter joins.
sourcepub fn with_start_cap(self, cap: Cap) -> Self
pub fn with_start_cap(self, cap: Cap) -> Self
Builder method for setting the cap style for the start of the stroke.
sourcepub fn with_end_cap(self, cap: Cap) -> Self
pub fn with_end_cap(self, cap: Cap) -> Self
Builder method for setting the cap style for the end of the stroke.
sourcepub fn with_dashes<P>(self, offset: f32, pattern: P) -> Self
pub fn with_dashes<P>(self, offset: f32, pattern: P) -> Self
Builder method for setting the dashing parameters.
sourcepub fn with_scale(self, yes: bool) -> Self
pub fn with_scale(self, yes: bool) -> Self
Builder method for setting whether or not the stroke should be affected by the scale of any applied transform.
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Stroke
impl Send for Stroke
impl Sync for Stroke
impl Unpin for Stroke
impl UnwindSafe for Stroke
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