Skip to content

Commit 2db917e

Browse files
author
Jonathan Feinberg
committed
chmod and reformat
1 parent 063a269 commit 2db917e

170 files changed

Lines changed: 130 additions & 21 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎Reference/api_en/PVector.xml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<category>Math</category>
66

7-
<subcategory></subcategory>
7+
<subcategory>PVector</subcategory>
88

99
<type></type>
1010

@@ -23,8 +23,8 @@ ellipse(v2.x, v2.y, 24, 24)
2323

2424

2525
<description><![CDATA[
26-
A class to describe a two or three dimensional vector, specifically a Euclidean (also known as geometric) vector. A vector is an entity that has both magnitude and direction. The datatype, however, stores the components of the vector (x,y for 2D, and x,y,z for 3D). The magnitude and direction can be accessed via the methods <b>mag()</b> and <b>heading()</b>.<br/>
27-
<br/>
26+
A class to describe a two or three dimensional vector, specifically a Euclidean (also known as geometric) vector. A vector is an entity that has both magnitude and direction. The datatype, however, stores the components of the vector (x,y for 2D, and x,y,z for 3D). The magnitude and direction can be accessed via the methods <b>mag()</b> and <b>heading()</b>.<br />
27+
<br />
2828
In many of the Processing examples, you will see <b>PVector</b> used to describe a position, velocity, or acceleration. For example, if you consider a rectangle moving across the screen, at any given instant it has a position (a vector that points from the origin to its location), a velocity (the rate at which the object's position changes per time unit, expressed as a vector), and acceleration (the rate at which the object's velocity changes per time unit, expressed as a vector). Since vectors represent groupings of values, we cannot simply use traditional addition/multiplication/etc. Instead, we'll need to do some "vector" math, which is made easy by the methods inside the <b>PVector</b> class.
2929
]]></description>
3030

‎Reference/api_en/fullScreen.xml‎

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2+
<root>
3+
<name>fullScreen()</name>
4+
5+
<category>Environment</category>
6+
7+
<subcategory></subcategory>
8+
9+
<type></type>
10+
11+
<example>
12+
<image></image>
13+
<notest/>
14+
<code><![CDATA[
15+
# Run the code at the full dimensions of the screen currently
16+
# selected inside the Preferences window
17+
18+
x = 0
19+
20+
def setup():
21+
fullScreen()
22+
background(0)
23+
noStroke()
24+
fill(102)
25+
26+
def draw():
27+
global x
28+
rect(x, height*0.2, 1, height*0.6)
29+
x = x + 2
30+
]]></code>
31+
</example>
32+
33+
<example>
34+
<image></image>
35+
<code><![CDATA[
36+
# If more than one screen is attached to the computer, run the
37+
# code at the full dimensions on the screen defined by the
38+
# parameter to fullScreen()
39+
40+
x = 0
41+
42+
def setup():
43+
fullScreen(2)
44+
background(0)
45+
noStroke()
46+
fill(102)
47+
48+
def draw():
49+
global x
50+
rect(x, height*0.2, 1, height*0.6)
51+
x = x + 2
52+
]]></code>
53+
</example>
54+
55+
<example>
56+
<image></image>
57+
<code><![CDATA[
58+
# Run full screen using the P2D renderer on screen 2
59+
60+
x = 0
61+
62+
def setup():
63+
fullScreen(P2D, 2)
64+
background(0)
65+
noStroke()
66+
fill(102)
67+
68+
def draw():
69+
global x
70+
rect(x, height*0.2, 1, height*0.6)
71+
x = x + 2
72+
]]></code>
73+
</example>
74+
75+
<example>
76+
<image></image>
77+
<code><![CDATA[
78+
# If more than one screen is attached to the computer, run the
79+
# code at the full dimensions across all of the attached screens
80+
81+
x = 0
82+
83+
def setup():
84+
fullScreen(P2D, SPAN)
85+
background(0)
86+
noStroke()
87+
fill(102)
88+
89+
def draw():
90+
rect(x, height*0.2, 1, height*0.6)
91+
x = x + 2
92+
]]></code>
93+
</example>
94+
95+
<description><![CDATA[
96+
This function is new for Processing 3.0. It opens a sketch using the full size of the computer's display. This function must be the first line in <b>setup()</b>. The <b>size()</b> and <b>fullScreen()</b> functions cannot both be used in the same program, just choose one.<br />
97+
<br />
98+
When <b>fullScreen()</b> is used without a parameter, it draws the sketch to the screen currently selected inside the Preferences window. When it is used with a single parameter, this number defines the screen to display to program on (e.g. 1, 2, 3...). When used with two parameters, the first defines the renderer to use (e.g. P2D) and the second defines the screen. The <b>SPAN</b> parameter can be used in place of a screen number to draw the sketch as a full-screen window across all of the attached displays if there are more than one.<br />
99+
<br />
100+
Prior to Processing 3.0, a full-screen program was defined with <b>size(displayWidth, displayHeight)</b>.
101+
]]></description>
102+
103+
</root>

‎Reference/api_en/size.xml‎

Lines changed: 24 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -48,24 +48,30 @@ box(35)
4848
</example>
4949

5050
<description><![CDATA[
51-
Defines the dimension of the display window in units of pixels. The <b>size()</b> function must be the first line of code, or the first code inside <b>setup()</b>. Any code that appears before the <b>size()</b> command may run more than once, which can lead to confusing results.<br/>
52-
<br/>
53-
The system variables <b>width</b> and <b>height</b> are set by the parameters passed to this function. If <b>size()</b> is not used, the window will be given a default size of 100x100 pixels. <br/>
54-
<br/>
55-
The <b>size()</b> function can only be used once inside a sketch, and it cannot be used for resizing.<br/>
56-
<br/>
57-
Do not use variables as the parameters to <b>size()</b> function, because it will cause problems when exporting your sketch. When variables are used, the dimensions of your sketch cannot be determined during export. Instead, employ numeric values in the <b>size()</b> statement, and then use the built-in <b>width</b> and <b>height</b> variables inside your program when the dimensions of the display window are needed.<br/>
58-
<br/>
59-
The maximum width and height is limited by your operating system, and is usually the width and height of your actual screen. On some machines it may simply be the number of pixels on your current screen, meaning that a screen of 800x600 could support <b>size(1600, 300)</b>, since that is the same number of pixels. This varies widely, so you'll have to try different rendering modes and sizes until you get what you're looking for. If you need something larger, use <b>createGraphics</b> to create a non-visible drawing surface.<br/>
60-
<br/>
61-
The <b>renderer</b> parameter selects which rendering engine to use. For example, if you will be drawing 3D shapes, use <b>P3D</b>. In addition to the default renderer, other renderers are:<br/>
62-
<br/>
63-
<b>P2D</b> (Processing 2D): A renderer that supports two-dimensional drawing.<br/>
64-
<br/>
65-
<b>P3D</b> (Processing 3D): 3D graphics renderer that makes use of OpenGL-compatible graphics hardware.<br/>
66-
<br/>
67-
<b>PDF</b>: The PDF renderer draws 2D graphics directly to an Acrobat PDF file. This produces excellent results when you need vector shapes for high-resolution output or printing. You must first use Import Library &rarr; PDF to make use of the library. More information can be found in the PDF library reference.<br/>
68-
<br/>
51+
Defines the dimension of the display window width and height in units of pixels. In a program that has the <b>setup()</b> function, the <b>size()</b> function must be the first line of code inside <b>setup()</b>.<br />
52+
<br />
53+
The built-in variables <b>width</b> and <b>height</b> are set by the parameters passed to this function. For example, running <b>size(640, 480)</b> will assign 640 to the <b>width</b> variable and 480 to the height <b>variable</b>. If <b>size()</b> is not used, the window will be given a default size of 100 x 100 pixels.<br />
54+
<br />
55+
The <b>size()</b> function can only be used once inside a sketch, and it cannot be used for resizing.<br />
56+
<br />
57+
As of Processing 3, to run a sketch at the full dimensions of a screen, use the <b>fullScreen()</b> function, rather than the older way of using <b>size(displayWidth, displayHeight)</b>.<br />
58+
<br />
59+
The maximum width and height is limited by your operating system, and is usually the width and height of your actual screen. On some machines it may simply be the number of pixels on your current screen, meaning that a screen of 800 x 600 could support <b>size(1600, 300)</b>, since that is the same number of pixels. This varies widely, so you'll have to try different rendering modes and sizes until you get what you're looking for. If you need something larger, use <b>createGraphics</b> to create a non-visible drawing surface.<br />
60+
<br />
61+
The minimum width and height is around 100 pixels in each direction. This is the smallest that is supported across Windows, macOS, and Linux. We enforce the minimum size so that sketches will run identically on different machines.
62+
<br />
63+
The <b>renderer</b> parameter selects which rendering engine to use. For example, if you will be drawing 3D shapes, use <b>P3D</b>. In addition to the default renderer, other renderers are:<br />
64+
<br />
65+
<b>P2D</b> (Processing 2D): 2D graphics renderer that makes use of OpenGL-compatible graphics hardware.<br />
66+
<br />
67+
<b>P3D</b> (Processing 3D): 3D graphics renderer that makes use of OpenGL-compatible graphics hardware.<br />
68+
<br />
69+
<b>FX2D</b> (JavaFX 2D): A 2D renderer that uses JavaFX, which may be faster for some applications, but has some compatibility quirks.
70+
<br />
71+
<b>PDF</b>: The PDF renderer draws 2D graphics directly to an Acrobat PDF file. This produces excellent results when you need vector shapes for high-resolution output or printing. You must first use Import Library &rarr; PDF to make use of the library. More information can be found in the PDF library reference.<br />
72+
<br />
73+
As of Processing 3.0, to use variables as the parameters to <b>size()</b> function, place the <b>size()</b> function within the <b>settings()</b> function (instead of <b>setup()</b>). There is more information about this on the <b>settings()</b> reference page.<br />
74+
<br />
6975
]]></description>
7076

7177
<syntax>

‎Tutorials/anatomy/imgs/accurate_pentagon.jpg‎

100755100644
File mode changed.

‎Tutorials/anatomy/imgs/bad_pentagon.jpg‎

100755100644
File mode changed.

‎Tutorials/anatomy/imgs/bad_stars.jpg‎

100755100644
File mode changed.

‎Tutorials/anatomy/imgs/better_stars.png‎

100755100644
File mode changed.

‎Tutorials/anatomy/imgs/cookie_stars.jpg‎

100755100644
File mode changed.

‎Tutorials/anatomy/imgs/good_stars.jpg‎

100755100644
File mode changed.

‎Tutorials/anatomy/imgs/poly2.png‎

100755100644
File mode changed.

0 commit comments

Comments
 (0)