Skip to content

Commit 7828775

Browse files
committed
changes to image names in Reference examples. Now: PImage img
1 parent f73603b commit 7828775

17 files changed

Lines changed: 85 additions & 90 deletions

content/api_en/PImage.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@
1111
<example>
1212
<image>PImage.jpg</image>
1313
<code><![CDATA[
14-
PImage b;
14+
PImage img;
1515
1616
void setup() {
17-
b = loadImage("laDefense.jpg");
17+
img = loadImage("laDefense.jpg");
1818
}
1919
2020
void draw() {
21-
image(b, 0, 0);
21+
image(img, 0, 0);
2222
}
2323
]]></code>
2424
</example>

content/api_en/PImage_filter.xml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,36 +10,36 @@
1010
<example>
1111
<image>filter_.jpg</image>
1212
<code><![CDATA[
13-
PImage a, b;
13+
PImage img1, img2;
1414
1515
void setup() {
16-
a = loadImage("archcrop.jpg");
17-
b = loadImage("archcrop.jpg");
18-
a.filter(GRAY);
16+
img1 = loadImage("archcrop.jpg");
17+
img2 = loadImage("archcrop.jpg");
18+
img1.filter(GRAY);
1919
}
2020
2121
void draw() {
22-
image(a, 0, 0);
23-
image(b, width/2, 0);
22+
image(img1, 0, 0);
23+
image(img2, width/2, 0);
2424
}
2525
]]></code>
2626
</example>
2727

2828
<example>
2929
<image>filter_2.gif</image>
3030
<code><![CDATA[
31-
PImage a, b;
31+
PImage img1, img2;
3232
3333
void setup() {
34-
a = loadImage("archcrop.jpg");
35-
b = loadImage("archcrop.jpg");
36-
a.filter(THRESHOLD, .6);
37-
b.filter(THRESHOLD, .4);
34+
img1 = loadImage("archcrop.jpg");
35+
img2 = loadImage("archcrop.jpg");
36+
img1.filter(THRESHOLD, .6);
37+
img2.filter(THRESHOLD, .4);
3838
}
3939
4040
void draw() {
41-
image(a, 0, 0);
42-
image(b, width/2, 0);
41+
image(img1, 0, 0);
42+
image(img2, width/2, 0);
4343
}
4444
]]></code>
4545
</example>

content/api_en/PImage_get.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ rect(25, 25, 50, 50);
2323
<code><![CDATA[
2424
PImage img = loadImage("tower.jpg");
2525
background(img);
26-
PImage b = img.get(50, 0, 50, 100);
27-
image(b, 0, 0);
26+
PImage img = img.get(50, 0, 50, 100);
27+
image(img, 0, 0);
2828
]]></code>
2929
</example>
3030

content/api_en/background.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ background(255, 204, 0);
2323
<example>
2424
<image>background_3.jpg</image>
2525
<code><![CDATA[
26-
PImage b;
27-
b = loadImage("laDefense.jpg");
28-
background(b);
26+
PImage img;
27+
img = loadImage("laDefense.jpg");
28+
background(img);
2929
]]></code>
3030
</example>
3131

content/api_en/filter.xml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,39 +7,39 @@
77
<example>
88
<image>filter_threshold.jpg</image>
99
<code><![CDATA[
10-
PImage b;
11-
b = loadImage("topanga.jpg");
12-
image(b, 0, 0);
10+
PImage img;
11+
img = loadImage("topanga.jpg");
12+
image(img, 0, 0);
1313
filter(THRESHOLD);
1414
]]></code>
1515
</example>
1616

1717
<example>
1818
<image>filter_gray.jpg</image>
1919
<code><![CDATA[
20-
PImage b;
21-
b = loadImage("topanga.jpg");
22-
image(b, 0, 0);
20+
PImage img;
21+
img = loadImage("topanga.jpg");
22+
image(img, 0, 0);
2323
filter(GRAY);
2424
]]></code>
2525
</example>
2626

2727
<example>
2828
<image>filter_invert.jpg</image>
2929
<code><![CDATA[
30-
PImage b;
31-
b = loadImage("topanga.jpg");
32-
image(b, 0, 0);
30+
PImage img;
31+
img = loadImage("topanga.jpg");
32+
image(img, 0, 0);
3333
filter(INVERT);
3434
]]></code>
3535
</example>
3636

3737
<example>
3838
<image>filter_posterize.jpg</image>
3939
<code><![CDATA[
40-
PImage b;
41-
b = loadImage("topanga.jpg");
42-
image(b, 0, 0);
40+
PImage img;
41+
img = loadImage("topanga.jpg");
42+
image(img, 0, 0);
4343
filter(GRAY);
4444
filter(POSTERIZE, 4);
4545
]]></code>
@@ -48,9 +48,9 @@ filter(POSTERIZE, 4);
4848
<example>
4949
<image>filter_blur.jpg</image>
5050
<code><![CDATA[
51-
PImage b;
52-
b = loadImage("topanga.jpg");
53-
image(b, 0, 0);
51+
PImage img;
52+
img = loadImage("topanga.jpg");
53+
image(img, 0, 0);
5454
filter(BLUR, 6);
5555
]]></code>
5656
</example>

content/api_en/image.xml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@
99
<example>
1010
<image>image_.jpg</image>
1111
<code><![CDATA[
12-
PImage b;
12+
PImage img;
1313
1414
void setup() {
1515
// Images must be in the "data" directory to load correctly
16-
b = loadImage("laDefense.jpg");
16+
img = loadImage("laDefense.jpg");
1717
}
1818
1919
void draw() {
20-
image(b, 0, 0);
20+
image(img, 0, 0);
2121
}
2222
]]></code>
2323
</example>
@@ -26,16 +26,16 @@ void draw() {
2626
<example>
2727
<image>image_2.jpg</image>
2828
<code><![CDATA[
29-
PImage b;
29+
PImage img;
3030
3131
void setup() {
3232
// Images must be in the "data" directory to load correctly
33-
b = loadImage("laDefense.jpg");
33+
img = loadImage("laDefense.jpg");
3434
}
3535
3636
void draw() {
37-
image(b, 0, 0);
38-
image(b, 0, 0, width/2, height/2);
37+
image(img, 0, 0);
38+
image(img, 0, 0, width/2, height/2);
3939
}
4040
]]></code>
4141
</example>

content/api_en/imageMode.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,17 @@
99
<example>
1010
<image>imageMode_.jpg</image>
1111
<code><![CDATA[
12-
PImage b;
12+
PImage img;
1313
1414
void setup() {
15-
b = loadImage("laDefense_crop.jpg");
15+
img = loadImage("laDefense_crop.jpg");
1616
imageMode(CORNERS);
1717
}
1818
1919
void draw() {
20-
image(b, 10, 10, 60, 60);
20+
image(img, 10, 10, 60, 60);
2121
imageMode(CORNER);
22-
image(b, 35, 35, 50, 50);
22+
image(img, 35, 35, 50, 50);
2323
}
2424
]]></code>
2525
</example>

content/api_en/include/continue.xml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,6 @@ When run inside of a <b>for</b> or <b>while</b>, it skips the remainder of the b
2828
<c>continue</c>
2929
</syntax>
3030

31-
<parameter>
32-
<label></label>
33-
<description></description>
34-
</parameter>
35-
3631
<returns></returns>
3732

3833
<related>

content/api_en/include/else.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
<example>
1212
<image>else.gif</image>
1313
<code><![CDATA[
14-
for(int i = 5; i &lt; 95; i += 5) {
15-
if(i &lt; 35) {
14+
for (int i = 5; i < 95; i += 5) {
15+
if (i < 35) {
1616
line( 30, i, 80, i );
1717
} else {
1818
line( 20, i, 90, i );
@@ -24,10 +24,10 @@ for(int i = 5; i &lt; 95; i += 5) {
2424
<example>
2525
<image>else2.gif</image>
2626
<code><![CDATA[
27-
for(int i = 5; i &lt; 95; i += 5) {
28-
if(i &lt; 35) {
27+
for (int i = 5; i < 95; i += 5) {
28+
if (i < 35) {
2929
line( 30, i, 80, i );
30-
} else if (i &lt; 65) {
30+
} else if (i < 65) {
3131
line( 20, i, 90, i );
3232
} else {
3333
line( 0, i, 100, i );

content/api_en/include/if.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
<example>
1212
<image>if_.gif</image>
1313
<code><![CDATA[
14-
for (int i=5; i &lt; height; i+=5) {
14+
for (int i = 5; i < height; i += 5) {
1515
stroke(255); //Set the color to white
16-
if(i &lt; 35) { //When "i" is less than "35"...
16+
if(i < 35) { //When "i" is less than "35"...
1717
stroke(0); //...set the color to black
1818
}
1919
line(30, i, 80, i);

0 commit comments

Comments
 (0)