Detect coincident points and bail out of the line join code as necessary.
This commit is contained in:
parent
c7ca630aad
commit
f142f045aa
|
@ -375,6 +375,10 @@ impl Contour {
|
||||||
let (p0, p1) = (self.position_of_last(2), self.position_of_last(1));
|
let (p0, p1) = (self.position_of_last(2), self.position_of_last(1));
|
||||||
let prev_tangent = LineSegment2F::new(p0, p1);
|
let prev_tangent = LineSegment2F::new(p0, p1);
|
||||||
|
|
||||||
|
if prev_tangent.square_length() < EPSILON || next_tangent.square_length() < EPSILON {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
match join {
|
match join {
|
||||||
LineJoin::Bevel => {}
|
LineJoin::Bevel => {}
|
||||||
LineJoin::Miter(miter_limit) => {
|
LineJoin::Miter(miter_limit) => {
|
||||||
|
|
Loading…
Reference in New Issue