mirror of
https://github.com/rough-stuff/rough.git
synced 2026-04-22 03:00:28 -04:00
deal with polygons of 0 area
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "roughjs",
|
||||
"version": "4.0.0",
|
||||
"version": "4.0.1",
|
||||
"description": "Create graphics using HTML Canvas or SVG with a hand-drawn, sketchy, appearance.",
|
||||
"main": "bundled/rough.cjs.js",
|
||||
"module": "bin/rough.js",
|
||||
|
||||
@@ -74,6 +74,9 @@ function straightHachureLines(points: Point[], o: ResolvedOptions): Line[] {
|
||||
}
|
||||
return (e1.ymax - e2.ymax) / Math.abs((e1.ymax - e2.ymax));
|
||||
});
|
||||
if (!edges.length) {
|
||||
return lines;
|
||||
}
|
||||
|
||||
// Start scanning
|
||||
let activeEdges: ActiveEdgeEntry[] = [];
|
||||
|
||||
Reference in New Issue
Block a user