Skip to content

Commit 498bc65

Browse files
committed
Made modification to the change in bezierVertex()
Instead of multiple inline code, only one grouped with <pre>
1 parent c49867c commit 498bc65

File tree

1 file changed

+51
-25
lines changed

1 file changed

+51
-25
lines changed

src/content/reference/en/p5/curveVertex.mdx

Lines changed: 51 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,28 @@ description: >
3131
3232
<a href="/reference/p5/endShape">endShape()</a> in order to draw a curve:</p>
3333
34-
<p>
35-
<code>beginShape();</code><br>
36-
<code>// Add the first control point.</code><br>
37-
<code>curveVertex(84, 91);</code><br>
38-
<code>// Add the anchor points to draw between.</code><br>
39-
<code>curveVertex(68, 19);</code><br>
40-
<code>curveVertex(21, 17);</code><br>
41-
<code>// Add the second control point.</code><br>
42-
<code>curveVertex(32, 91);</code><br>
43-
<code>endShape();</code><br>
44-
</p>
34+
<pre><code>beginShape();
35+
36+
37+
// Add the first control point.
38+
39+
curveVertex(84, 91);
40+
41+
42+
// Add the anchor points to draw between.
43+
44+
curveVertex(68, 19);
45+
46+
curveVertex(21, 17);
47+
48+
49+
// Add the second control point.
50+
51+
curveVertex(32, 91);
52+
53+
54+
endShape();
55+
</code></pre>
4556
4657
<p>The code snippet above would only draw the curve between the anchor points,
4758
@@ -52,20 +63,35 @@ description: >
5263
5364
<code>curveVertex()</code> with the coordinates of the control points:</p>
5465
55-
<p>
56-
<code>beginShape();</code><br>
57-
<code>// Add the first control point and draw a segment to it.</code><br>
58-
<code>curveVertex(84, 91);</code><br>
59-
<code>curveVertex(84, 91);</code><br>
60-
<code>// Add the anchor points to draw between.</code><br>
61-
<code>curveVertex(68, 19);</code><br>
62-
<code>curveVertex(21, 17);</code><br>
63-
<code>// Add the second control point.</code><br>
64-
<code>curveVertex(32, 91);</code><br>
65-
<code>// Uncomment the next line to draw the segment to the second control point.</code><br>
66-
<code>// curveVertex(32, 91);</code><br>
67-
<code>endShape();</code><br>
68-
</p>
66+
<pre><code>beginShape();
67+
68+
69+
// Add the first control point and draw a segment to it.
70+
71+
curveVertex(84, 91);
72+
73+
curveVertex(84, 91);
74+
75+
76+
// Add the anchor points to draw between.
77+
78+
curveVertex(68, 19);
79+
80+
curveVertex(21, 17);
81+
82+
83+
// Add the second control point.
84+
85+
curveVertex(32, 91);
86+
87+
88+
// Uncomment the next line to draw the segment to the second control point.
89+
90+
// curveVertex(32, 91);
91+
92+
93+
endShape();
94+
</code></pre>
6995
7096
<p>The first two parameters, <code>x</code> and <code>y</code>, set the
7197
vertex’s location. For

0 commit comments

Comments
 (0)