Enum piet_common::LineJoin
source · pub enum LineJoin {
Miter {
limit: f64,
},
Round,
Bevel,
}
Expand description
Options for angled joins in strokes.
Variants§
Miter
The outer edges of the two paths are extended until they intersect.
Because the miter length can be extreme for small angles, you must supply
a ‘limit’ at which we will fallback on LineJoin::Bevel
.
This limit is the distance from the point where the inner edges of the stroke meet to the point where the outer edges meet.
The default limit is 10.0
.
This is also currently the default LineJoin
; you should only need to
construct it if you need to customize the limit
.
Round
The two lines are joined by a circular arc.
Bevel
The two segments are capped with LineCap::Butt
, and the notch is filled.
Implementations§
source§impl LineJoin
impl LineJoin
sourcepub const DEFAULT_MITER_LIMIT: f64 = 10f64
pub const DEFAULT_MITER_LIMIT: f64 = 10f64
The default maximum length for a LineJoin::Miter
.
This is defined in the Postscript Language Reference (pp 676).
Trait Implementations§
source§impl PartialEq<LineJoin> for LineJoin
impl PartialEq<LineJoin> for LineJoin
impl Copy for LineJoin
impl StructuralPartialEq for LineJoin
Auto Trait Implementations§
impl RefUnwindSafe for LineJoin
impl Send for LineJoin
impl Sync for LineJoin
impl Unpin for LineJoin
impl UnwindSafe for LineJoin
Blanket Implementations§
source§impl<T, U> RoundInto<U> for Twhere
U: RoundFrom<T>,
impl<T, U> RoundInto<U> for Twhere
U: RoundFrom<T>,
source§fn round_into(self) -> U
fn round_into(self) -> U
Performs the conversion.