1
0
mirror of https://github.com/Pomax/BezierInfo-2.git synced 2025-08-25 17:42:46 +02:00
This commit is contained in:
Pomax
2020-08-29 15:29:49 -07:00
parent 2e66f90a69
commit 10148f46b1
18 changed files with 229 additions and 336 deletions

View File

@@ -155,13 +155,14 @@ class Bezier extends Original {
return p;
}
drawStruts(t) {
drawStruts(t, color = `black`) {
const p = t.forEach ? t : this.getStrutPoints(t);
const api = this.api;
const ctx = api.ctx;
ctx.cacheStyle();
api.noFill();
api.setStroke(color);
let s = this.points.length;
let n = this.points.length;
@@ -176,6 +177,8 @@ class Bezier extends Original {
s += n;
}
ctx.restoreStyle();
return p;
}
drawBoundingBox(color) {