Skip to content

Commit 7c99cac

Browse files
committed
Removing delay() and LIB_opengl from the reference
1 parent 4947445 commit 7c99cac

22 files changed

Lines changed: 50 additions & 195 deletions

content/api_en/LIB_net/Server_stop.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
// "java.net.SocketException: Socket closed
1919
// at java.net.PlainSocketImpl.socketAccept(Native Method)"
2020
21-
2221
import processing.net.*;
2322
2423
int port = 10002;

content/api_en/LIB_opengl/index.html

Lines changed: 0 additions & 129 deletions
This file was deleted.

content/api_en/PImage_get.xml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,11 @@ image(b, 0, 0);
2929
</example>
3030

3131
<description><![CDATA[
32-
Reads the color of any pixel or grabs a group of pixels. If no parameters are specified, the entire image is returned. Get the value of one pixel by specifying an x,y coordinate. Get a section of the display window by specifing an additional <b>width</b> and <b>height</b> parameter. If the pixel requested is outside of the image window, black is returned. The numbers returned are scaled according to the current color ranges, but only RGB values are returned by this function. Even though you may have drawn a shape with <b>colorMode(HSB)</b>, the numbers returned will be in RGB.
33-
<br /><br />
34-
Getting the color of a single pixel with <b>get(x, y)</b> is easy, but not as fast as grabbing the data directly from <b>pixels[]</b>. The equivalent statement to "get(x, y)" using <b>pixels[]</b> is "pixels[y*width+x]". Processing requires calling <b>loadPixels()</b> to load the display window data into the <b>pixels[]</b> array before getting the values.
32+
Reads the color of any pixel or grabs a section of an image. If no parameters are specified, the entire image is returned. Use the <b>x</b> and <b>y</b> parameters to get the value of one pixel. Get a section of the display window by specifying an additional <b>width</b> and <b>height</b> parameter. When getting an image, the <b>x</b> and <b>y</b> parameters define the coordinates for the upper-left corner of the image, regardless of the current <b>imageMode()</b>.<br />
33+
<br />
34+
If the pixel requested is outside of the image window, black is returned. The numbers returned are scaled according to the current color ranges, but only RGB values are returned by this function. For example, even though you may have drawn a shape with <b>colorMode(HSB)</b>, the numbers returned will be in RGB format.<br />
35+
<br />
36+
Getting the color of a single pixel with <b>get(x, y)</b> is easy, but not as fast as grabbing the data directly from <b>pixels[]</b>. The equivalent statement to <b>get(x, y)</b> using <b>pixels[]</b> is <b>pixels[y*width+x]</b>. See the reference for <b>pixels[]</b> for more information.
3537
]]></description>
3638

3739
</root>

content/api_en/PImage_set.xml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,11 @@ void draw() {
2727
</example>
2828

2929
<description><![CDATA[
30-
Changes the color of any pixel or writes an image directly into the image. The <b>x</b> and <b>y</b> parameter specify the pixel or the upper-left corner of the image. The <b>color</b> parameter specifies the color value.<br />
30+
Changes the color of any pixel or writes an image directly into the display window.<br />
3131
<br />
32-
Setting the color of a single pixel with <b>set(x, y)</b> is easy, but not as fast as putting the data directly into <b>pixels[]</b>. The equivalent statement to "set(x, y, #000000)" using <b>pixels[]</b> is "pixels[y*width+x] = #000000". Processing requires calling <b>loadPixels()</b> to load the display window data into the <b>pixels[]</b> array before getting the values and calling <b>updatePixels()</b> to update the window.
32+
The <b>x</b> and <b>y</b> parameters specify the pixel to change and the <b>color</b> parameter specifies the color value. The color parameter is affected by the current color mode (the default is RGB values from 0 to 255). When setting an image, the <b>x</b> and <b>y</b> parameters define the coordinates for the upper-left corner of the image, regardless of the current <b>imageMode()</b>.
33+
<br /><br />
34+
Setting the color of a single pixel with <b>set(x, y)</b> is easy, but not as fast as putting the data directly into <b>pixels[]</b>. The equivalent statement to <b>set(x, y, #000000)</b> using <b>pixels[]</b> is <b>pixels[y*width+x] = #000000</b>. See the reference for <b>pixels[]</b> for more information.
3335
]]></description>
3436

3537
</root>

content/api_en/beginRaw.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ void keyPressed() {
3030
</example>
3131

3232
<description><![CDATA[
33-
To create vectors from 3D data, use the <b>beginRaw()</b> and <b>endRaw()</b> commands. These commands will grab the shape data just before it is rendered to the screen. At this stage, your entire scene is nothing but a long list of individual lines and triangles. This means that a shape created with <b>sphere()</b> method will be made up of hundreds of triangles, rather than a single object. Or that a multi-segment line shape (such as a curve) will be rendered as individual segments.
33+
To create vectors from 3D data, use the <b>beginRaw()</b> and <b>endRaw()</b> commands. These commands will grab the shape data just before it is rendered to the screen. At this stage, your entire scene is nothing but a long list of individual lines and triangles. This means that a shape created with <b>sphere()</b> function will be made up of hundreds of triangles, rather than a single object. Or that a multi-segment line shape (such as a curve) will be rendered as individual segments.
3434
<br /><br />
3535
When using <b>beginRaw()</b> and <b>endRaw()</b>, it's possible to write to either a 2D or 3D renderer. For instance, <b>beginRaw()</b> with the PDF library will write the geometry as flattened triangles and lines, even if recording from the <b>P3D</b> renderer.
3636
<br /><br />

content/api_en/createInput.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414

1515
<description><![CDATA[
16-
This is a method for advanced programmers to open a Java InputStream. The method is useful if you want to use the facilities provided by PApplet to easily open files from the data folder or from a URL, but want an InputStream object so that you can use other Java methods to take more control of how the stream is read.<br />
16+
This is a function for advanced programmers to open a Java InputStream. It's useful if you want to use the facilities provided by PApplet to easily open files from the data folder or from a URL, but want an InputStream object so that you can use other parts of Java to take more control of how the stream is read.<br />
1717
<br />
1818
The filename passed in can be:<br />
1919
- A URL, for instance <b>openStream("http://processing.org/")</b><br />

content/api_en/createOutput.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Similar to <b>createInput()</b>, this creates a Java <b>OutputStream</b> for a g
1616
<br /><br />
1717
If the path does not exist, intermediate folders will be created. If an exception occurs, it will be printed to the console, and <b>null</b> will be returned.
1818
<br /><br />
19-
This method is a convenience over the Java approach that requires you to 1) create a FileOutputStream object, 2) determine the exact file location, and 3) handle exceptions. Exceptions are handled internally by the function, which is more appropriate for "sketch" projects.
19+
This function is a convenience over the Java approach that requires you to 1) create a FileOutputStream object, 2) determine the exact file location, and 3) handle exceptions. Exceptions are handled internally by the function, which is more appropriate for "sketch" projects.
2020
<br /><br />
2121
If the output filename ends with <b>.gz</b>, the output will be automatically GZIP compressed as it is written.
2222
]]></description>

content/api_en/degrees.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ println(rad + " radians is " + deg + " degrees");
1616
</example>
1717

1818
<description><![CDATA[
19-
Converts a radian measurement to its corresponding value in degrees. Radians and degrees are two ways of measuring the same thing. There are 360 degrees in a circle and 2*PI radians in a circle. For example, 90&deg; = PI/2 = 1.5707964. All trigonometric methods in Processing require their parameters to be specified in radians.
19+
Converts a radian measurement to its corresponding value in degrees. Radians and degrees are two ways of measuring the same thing. There are 360 degrees in a circle and 2*PI radians in a circle. For example, 90&deg; = PI/2 = 1.5707964. All trigonometric functions in Processing require their parameters to be specified in radians.
2020
]]></description>
2121

2222
</root>

content/api_en/delay.xml

Lines changed: 0 additions & 27 deletions
This file was deleted.

content/api_en/dist.xml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,15 @@
99
<example>
1010
<image></image>
1111
<code><![CDATA[
12-
// Sets the background gray value based on
13-
// the distance of the mouse from the center
12+
// Sets the background gray value based on the distance
13+
// of the mouse from the center of the screen
1414
void draw() {
15-
float d = dist(50, 50, mouseX, mouseY);
16-
fill(d*4);
17-
rect(0, 0, 99, 99);
15+
noStroke();
16+
float d = dist(width/2, height/2, mouseX, mouseY);
17+
float maxDist = dist(0, 0, width/2, height/2);
18+
float gray = map(d, 0, maxDist, 0, 255);
19+
fill(gray);
20+
rect(0, 0, width, height);
1821
}
1922
]]></code>
2023
</example>

0 commit comments

Comments
 (0)