Skip to content

Commit 1dc9805

Browse files
authored
adding bezier-curves
1 parent d4bed64 commit 1dc9805

File tree

1 file changed

+6
-12
lines changed

1 file changed

+6
-12
lines changed

src/type/p5.Font.js

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -154,20 +154,16 @@ class Font {
154154
* vertex(x, y);
155155
* break;
156156
* }
157-
* case 'Q': {
158-
* // Quadratic curve to: ['Q', cx, cy, x, y]
159-
* // Simplified to just draw line to endpoint
160-
* const x = cmd[3];
161-
* const y = cmd[4];
162-
* vertex(x, y);
163-
* break;
164-
* }
165157
* case 'C': {
166-
* // Cubic bezier to: ['C', x1, y1, x2, y2, x3, y3]
158+
* // Cubic bezier
167159
* // Simplified to just draw line to endpoint
160+
* const cx = cmd[3];
161+
* const cy = cmd[4];
168162
* const x = cmd[5];
169163
* const y = cmd[6];
170-
* vertex(x, y);
164+
* bezierOrder(2);
165+
* bezierVertex(cx, cy);
166+
* bezierVertex(x, y);
171167
* break;
172168
* }
173169
* case 'Z': {
@@ -181,8 +177,6 @@ class Font {
181177
* endContour();
182178
* endShape();
183179
*
184-
* // Note: The letters will appear angular since we're only using lines
185-
* // between points rather than the actual curves from the font outlines.
186180
* }
187181
* </code>
188182
* </div>

0 commit comments

Comments
 (0)