Skip to content

Commit 1b2dfbf

Browse files
committed
Group of Reference updates
1 parent fe06828 commit 1b2dfbf

7 files changed

Lines changed: 21 additions & 8 deletions

File tree

content/api_en/arc.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ arc(50, 50, 80, 80, 0, PI+QUARTER_PI, PIE);
3939
<description><![CDATA[
4040
Draws an arc to the screen. Arcs are drawn along the outer edge of an ellipse defined by the <b>a</b>, <b>b</b>, <b>c</b>, and <b>d</b> parameters. The origin of the arc's ellipse may be changed with the <b>ellipseMode()</b> function. Use the <b>start</b> and <b>stop</b> parameters to specify the angles (in radians) at which to draw the arc.<br />
4141
<br />
42-
There are three ways to draw an arc; the rendering technique used is defined by the optional seventh paramter. The three options, depicted in the above examples, are PIE, OPEN, and CHORD. The default mode is the OPEN stroke with a PIE fill.
42+
There are three ways to draw an arc; the rendering technique used is defined by the optional seventh parameter. The three options, depicted in the above examples, are PIE, OPEN, and CHORD. The default mode is the OPEN stroke with a PIE fill.<br />
43+
<br />
44+
In some cases, the <b>arc()</b> function isn't accurate enough for smooth drawing. For example, the shape may jitter on screen when rotating slowly. If you're having an issue with how arcs are rendered, you'll need to draw the arc yourself with <b>beginShape()</b>/<b>endShape()</b> or a <b>PShape</b>.
4345
]]></description>
4446

4547
</root>

content/api_en/beginContour.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ endShape(CLOSE);
3232
</example>
3333

3434
<description><![CDATA[
35-
Use the <b>beginContour()</b> and <b>endContour()</b> function to create negative shapes within shapes such as the center of the letter 'O'. <b>beginContour()</b> begins recording vertices for the shape and <b>endContour()</b> stops recording. The vertices that define a negative shape must "wind" in the opposite direction from the exterior shape. First draw vertices for the exterior shape in clockwise order, then for internal shapes, draw vertices counter-clockwise.<br />
35+
Use the <b>beginContour()</b> and <b>endContour()</b> function to create negative shapes within shapes such as the center of the letter 'O'. <b>beginContour()</b> begins recording vertices for the shape and <b>endContour()</b> stops recording. The vertices that define a negative shape must "wind" in the opposite direction from the exterior shape. First draw vertices for the exterior shape in clockwise order, then for internal shapes, draw vertices counterclockwise.<br />
3636
<br />
3737
These functions can only be used within a <b>beginShape()</b>/<b>endShape()</b> pair and transformations such as <b>translate()</b>, <b>rotate()</b>, and <b>scale()</b> do not work within a <b>beginContour()</b>/<b>endContour()</b> pair. It is also not possible to use other shapes, such as <b>ellipse()</b> or <b>rect()</b> within.
3838
]]></description>

content/api_en/endContour.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ endShape(CLOSE);
3232
</example>
3333

3434
<description><![CDATA[
35-
Use the <b>beginContour()</b> and <b>endContour()</b> function to create negative shapes within shapes such as the center of the letter 'O'. <b>beginContour()</b> begins recording vertices for the shape and <b>endContour()</b> stops recording. The vertices that define a negative shape must "wind" in the opposite direction from the exterior shape. First draw vertices for the exterior shape in clockwise order, then for internal shapes, draw vertices counter-clockwise.<br />
35+
Use the <b>beginContour()</b> and <b>endContour()</b> function to create negative shapes within shapes such as the center of the letter 'O'. <b>beginContour()</b> begins recording vertices for the shape and <b>endContour()</b> stops recording. The vertices that define a negative shape must "wind" in the opposite direction from the exterior shape. First draw vertices for the exterior shape in clockwise order, then for internal shapes, draw vertices counterclockwise.<br />
3636
<br />
3737
These functions can only be used within a <b>beginShape()</b>/<b>endShape()</b> pair and transformations such as <b>translate()</b>, <b>rotate()</b>, and <b>scale()</b> do not work within a <b>beginContour()</b>/<b>endContour()</b> pair. It is also not possible to use other shapes, such as <b>ellipse()</b> or <b>rect()</b> within.
3838
]]></description>

content/api_en/hint.xml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@
99
<type></type>
1010

1111
<description><![CDATA[
12-
This command is used to enable or disable special features that control how graphics are drawn. In the course of developing Processing, we have to make many decisions about tradeoffs between performance and visual quality. We put significant effort into determining what makes most sense for the largest number of users, and then use functions like the hint() command to allow people to tune the settings for their particular sketch.
13-
<br /><br />
14-
Implementing a <b>hint()</b> is a last resort that's used when a more elegant solution cannot be found. Some options might graduate to standard features instead of hints over time, or be added and removed between (major) releases.
12+
This command is used to enable or disable special features that control how graphics are drawn. In the course of developing Processing, we had to make hard decisions about tradeoffs between performance and visual quality. We put significant effort into determining what makes most sense for the largest number of users, and then use functions like <b>hint()</b> to allow people to tune the settings for their particular sketch. Implementing a <b>hint()</b> is a last resort that's used when a more elegant solution cannot be found. Some options might graduate to standard features instead of hints over time, or be added and removed between (major) releases.
1513
<br /><br />
1614
Hints that are used by the default (Java2D) renderer:
1715
<br /><br />
@@ -33,7 +31,7 @@ Hints for use with P3D only:
3331
<br /><br />
3432
<b>hint(DISABLE_OPTIMIZED_STROKE)</b> - It forces the P3D renderer to draw each shape (including its strokes) separately, instead of batching them into larger groups for better performance. One consequence of this is that 2D items drawn with P3D are correctly stacked on the screen, depending on the order in which they were drawn. Otherwise, glitches such as the stroke lines being drawn on top of the interior of all the shapes will occur. However, this hint can make rendering substantially slower, so it is recommended to use it only when drawing a small amount of shapes. For drawing two-dimensional scenes, use the P2D renderer instead, which doesn't need the hint to properly stack shapes and their strokes.
3533
<br /><br />
36-
<b>hint(ENABLE_STROKE_PERSPECTIVE)</b> - This causes stroke geometry (lines and points) to be affected by the perspective, meaning that they will look smaller as they move away from the camera.
34+
<b>hint(ENABLE_STROKE_PERSPECTIVE)</b> - This causes stroke geometry (lines and points) to be affected by the perspective, meaning that they will look smaller as they move away from the camera.
3735
]]></description>
3836

3937
</root>

content/api_en/include/logicalNOT.xml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,20 @@ boolean a = false;
1515
if (!a) {
1616
rect(30, 20, 50, 50);
1717
}
18-
a = true;
18+
if (a) {
19+
line(20, 10, 90, 80);
20+
line(20, 80, 90, 10);
21+
}
22+
]]></code>
23+
</example>
24+
25+
<example>
26+
<image>logicalNOT.png</image>
27+
<code><![CDATA[
28+
boolean a = true;
29+
if (!a) {
30+
rect(30, 20, 50, 50);
31+
}
1932
if (a) {
2033
line(20, 10, 90, 80);
2134
line(20, 80, 90, 10);

content/api_media/logicalNOT.png

-467 Bytes
Loading

content/api_media/logicalNOT_2.png

761 Bytes
Loading

0 commit comments

Comments
 (0)