-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* reference: Add background Signed-off-by: Ce Gao <[email protected]> * reference: Add clear Signed-off-by: Ce Gao <[email protected]> * reference: Add colorMode Signed-off-by: Ce Gao <[email protected]> * reference: Add fill Signed-off-by: Ce Gao <[email protected]> * reference: Add noFill Signed-off-by: Ce Gao <[email protected]> * refenrece: Add noStroke Signed-off-by: Ce Gao <[email protected]> * reference: Add alpha Signed-off-by: Ce Gao <[email protected]> * reference: Add blue Signed-off-by: Ce Gao <[email protected]> * reference: Add brightness Signed-off-by: Ce Gao <[email protected]> * reference: Add color Signed-off-by: Ce Gao <[email protected]> * reference: Add hue and green Signed-off-by: Ce Gao <[email protected]> * reference: Add lerpColor Signed-off-by: Ce Gao <[email protected]> * reference: Add red Signed-off-by: Ce Gao <[email protected]> * reference: Add saturation Signed-off-by: Ce Gao <[email protected]> * reference: Add stroke Signed-off-by: Ce Gao <[email protected]> * src: Add test case Signed-off-by: Ce Gao <[email protected]>
- Loading branch information
Showing
69 changed files
with
777 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
test: | ||
reference: https://processing.org/reference/images/alpha_.png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
noStroke() | ||
c = color(0, 126, 255, 102) | ||
fill(c) | ||
rect(15, 15, 35, 70) | ||
value = alpha(c) # Sets 'value' to 102 | ||
fill(value) | ||
rect(50, 15, 35, 70) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
test: | ||
reference: https://processing.org/reference/images/background_0.png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
background(51) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
test: | ||
reference: https://processing.org/reference/images/background_1.png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
background(255, 204, 0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
img = loadImage("laDefense.jpg") | ||
background(img) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
test: | ||
reference: https://processing.org/reference/images/blue_.png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
c = color(175, 100, 220) # Define color 'c' | ||
fill(c) # Use color variable 'c' as fill color | ||
rect(15, 20, 35, 60) # Draw left rectangle | ||
|
||
blueValue = blue(c) # Get blue in 'c' | ||
println(blueValue) # Prints '220.0' | ||
fill(0, 0, blueValue) # Use 'blueValue' in new fill | ||
rect(50, 20, 35, 60) # Draw right rectangle |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
test: | ||
reference: https://processing.org/reference/images/brightness_.png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
noStroke() | ||
colorMode(HSB, 255) | ||
c = color(0, 126, 255) | ||
fill(c) | ||
rect(15, 20, 35, 60) | ||
value = brightness(c) # Sets 'value' to 255 | ||
fill(value) | ||
rect(50, 20, 35, 60) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
pg <- NULL | ||
|
||
settings <- function() { | ||
size(200, 200) | ||
} | ||
|
||
setup <- function() { | ||
pg <- createGraphics(100, 100) | ||
} | ||
|
||
draw <- function() { | ||
background(204) | ||
pg$beginDraw() | ||
pg$stroke(0, 102, 153) | ||
pg$line(0, 0, mouseX, mouseY) | ||
pg$endDraw() | ||
image(pg, 50, 50) | ||
} | ||
|
||
# Click to clear the PGraphics object | ||
mousePressed <- function() { | ||
pg$beginDraw() | ||
pg$clear() | ||
pg$endDraw() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
test: | ||
reference: https://processing.org/reference/images/color_0.png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
c = color(255, 204, 0) # Define color 'c' | ||
fill(c) # Use color variable 'c' as fill color | ||
noStroke() # Don't draw a stroke around shapes | ||
rect(30, 20, 55, 55) # Draw rectangle |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
test: | ||
reference: https://processing.org/reference/images/color_1.png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
c = color(255, 204, 0) # Define color 'c' | ||
fill(c) # Use color variable 'c' as fill color | ||
noStroke() # Don't draw a stroke around shapes | ||
ellipse(25, 25, 80, 80) # Draw left circle | ||
|
||
# Using only one value with color() generates a grayscale value. | ||
c = color(65) # Update 'c' with grayscale value | ||
fill(c) # Use updated 'c' as fill color | ||
ellipse(75, 75, 80, 80) # Draw right circle |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
test: | ||
reference: https://processing.org/reference/images/color_2.png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
noStroke() # Don't draw a stroke around shapes | ||
|
||
# If no colorMode is specified, then the default of RGB with scale of 0-255 is | ||
# used. | ||
c = color(50, 55, 100) # Create a color for 'c' | ||
fill(c) # Use color variable 'c' as fill color | ||
rect(0, 10, 45, 80) # Draw left rect | ||
|
||
colorMode(HSB, 100) # Use HSB with scale of 0-100 | ||
c = color(50, 55, 100) # Update 'c' with new color | ||
fill(c) # Use updated 'c' as fill color | ||
rect(55, 10, 45, 80) # Draw right rect |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
test: | ||
reference: https://processing.org/reference/images/colorMode_0.png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
noStroke() | ||
colorMode(RGB, 100) | ||
for (i in 0:100) { | ||
for (j in 0:100) { | ||
stroke(i, j, 0) | ||
point(i, j) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
test: | ||
reference: https://processing.org/reference/images/colorMode_1.png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
noStroke() | ||
colorMode(HSB, 100) | ||
for (i in 0:100) { | ||
for (j in 0:100) { | ||
stroke(i, j, 100) | ||
point(i, j) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
test: | ||
reference: https://processing.org/reference/images/colorMode_2.png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# If the color is defined here, it won't be affected by the colorMode() in | ||
# setup(). Instead, just declare the variable here and assign the value after | ||
# the colorMode() in setup() color bg = color(180, 50, 50); # No | ||
|
||
bg <- NULL | ||
|
||
setup <- function() { | ||
size(100, 100) | ||
colorMode(HSB, 360, 100, 100) | ||
bg = color(180, 50, 50) | ||
} | ||
|
||
draw <- function() { | ||
background(bg) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
test: | ||
reference: https://processing.org/reference/images/fill_0.png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
fill(153) | ||
rect(30, 20, 55, 55) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
test: | ||
reference: https://processing.org/reference/images/fill_1.png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
fill(204, 102, 0) | ||
rect(30, 20, 55, 55) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
test: | ||
reference: https://processing.org/reference/images/green_.png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
c = color(20, 75, 200) # Define color 'c' | ||
fill(c) # Use color variable 'c' as fill color | ||
rect(15, 20, 35, 60) # Draw left rectangle | ||
|
||
greenValue = green(c) # Get green in 'c' | ||
print(greenValue) # Print '75.0' | ||
fill(0, greenValue, 0) # Use 'greenValue' in new fill | ||
rect(50, 20, 35, 60) # Draw right rectangle |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
test: | ||
reference: https://processing.org/reference/images/hue_.png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
noStroke() | ||
colorMode(HSB, 255) | ||
c = color(0, 126, 255) | ||
fill(c) | ||
rect(15, 20, 35, 60) | ||
value = hue(c) # Sets 'value' to '0' | ||
fill(value) | ||
rect(50, 20, 35, 60) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
test: | ||
reference: https://processing.org/reference/images/lerpColor_.png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
stroke(255) | ||
background(51) | ||
from = color(204, 102, 0) | ||
to = color(0, 102, 153) | ||
interA = lerpColor(from, to, 0.33) | ||
interB = lerpColor(from, to, 0.66) | ||
fill(from) | ||
rect(10, 20, 20, 60) | ||
fill(interA) | ||
rect(30, 20, 20, 60) | ||
fill(interB) | ||
rect(50, 20, 20, 60) | ||
fill(to) | ||
rect(70, 20, 20, 60) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
test: | ||
reference: https://processing.org/reference/images/noFill_.png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
rect(15, 10, 55, 55) | ||
noFill() | ||
rect(30, 20, 55, 55) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
test: | ||
reference: https://processing.org/reference/images/noStroke_.png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
noStroke() | ||
rect(30, 20, 55, 55) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
test: | ||
reference: https://processing.org/reference/images/red_.png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
c = color(255, 204, 0) # Define color 'c' | ||
fill(c) # Use color variable 'c' as fill color | ||
rect(15, 20, 35, 60) # Draw left rectangle | ||
|
||
redValue = red(c) # Get red in 'c' | ||
println(redValue) # Print '255.0' | ||
fill(redValue, 0, 0) # Use 'redValue' in new fill | ||
rect(50, 20, 35, 60) # Draw right rectangle |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
test: | ||
reference: https://processing.org/reference/images/saturation_.png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
noStroke() | ||
colorMode(HSB, 255) | ||
c = color(0, 126, 255) | ||
fill(c) | ||
rect(15, 20, 35, 60) | ||
value = saturation(c) # Sets 'value' to 126 | ||
fill(value) | ||
rect(50, 20, 35, 60) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
test: | ||
reference: https://processing.org/reference/images/stroke_0.png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
stroke(153) | ||
rect(30, 20, 55, 55) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
test: | ||
reference: https://processing.org/reference/images/stroke_1.png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
stroke(204, 102, 0) | ||
rect(30, 20, 55, 55) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
|
||
// Generated by hack/generate-e2e-test.py | ||
package test.e2e.core.function; | ||
|
||
import static org.junit.Assert.fail; | ||
import org.junit.Test; | ||
import test.e2e.core.E2eTestBase; | ||
|
||
public class Alpha1Test extends E2eTestBase { | ||
|
||
public Alpha1Test() { | ||
coreCodeTemplate = "noStroke()\nc = color(0, 126, 255, 102)\nfill(c)\nrect(15, 15, 35, 70)\nvalue = alpha(c) # Sets 'value' to 102\nfill(value)\nrect(50, 15, 35, 70)\n\nsaveFrame(\"%s\")\nexit()\n"; | ||
referenceURI = "https://processing.org/reference/images/alpha_.png"; | ||
} | ||
|
||
@Test | ||
public void test() { | ||
try { | ||
defaultOperation(); | ||
} catch (Exception exception) { | ||
System.err.println(exception); | ||
fail("Should not have thrown any exception"); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
|
||
// Generated by hack/generate-e2e-test.py | ||
package test.e2e.core.function; | ||
|
||
import static org.junit.Assert.fail; | ||
import org.junit.Test; | ||
import test.e2e.core.E2eTestBase; | ||
|
||
public class Background1Test extends E2eTestBase { | ||
|
||
public Background1Test() { | ||
coreCodeTemplate = "background(51)\n\nsaveFrame(\"%s\")\nexit()\n"; | ||
referenceURI = "https://processing.org/reference/images/background_0.png"; | ||
} | ||
|
||
@Test | ||
public void test() { | ||
try { | ||
defaultOperation(); | ||
} catch (Exception exception) { | ||
System.err.println(exception); | ||
fail("Should not have thrown any exception"); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
|
||
// Generated by hack/generate-e2e-test.py | ||
package test.e2e.core.function; | ||
|
||
import static org.junit.Assert.fail; | ||
import org.junit.Test; | ||
import test.e2e.core.E2eTestBase; | ||
|
||
public class Background2Test extends E2eTestBase { | ||
|
||
public Background2Test() { | ||
coreCodeTemplate = "background(255, 204, 0)\n\nsaveFrame(\"%s\")\nexit()\n"; | ||
referenceURI = "https://processing.org/reference/images/background_1.png"; | ||
} | ||
|
||
@Test | ||
public void test() { | ||
try { | ||
defaultOperation(); | ||
} catch (Exception exception) { | ||
System.err.println(exception); | ||
fail("Should not have thrown any exception"); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
|
||
// Generated by hack/generate-e2e-test.py | ||
package test.e2e.core.function; | ||
|
||
import static org.junit.Assert.fail; | ||
import org.junit.Test; | ||
import test.e2e.core.E2eTestBase; | ||
|
||
public class Blue1Test extends E2eTestBase { | ||
|
||
public Blue1Test() { | ||
coreCodeTemplate = "c = color(175, 100, 220) # Define color 'c'\nfill(c) # Use color variable 'c' as fill color\nrect(15, 20, 35, 60) # Draw left rectangle\n\nblueValue = blue(c) # Get blue in 'c'\nprintln(blueValue) # Prints '220.0'\nfill(0, 0, blueValue) # Use 'blueValue' in new fill\nrect(50, 20, 35, 60) # Draw right rectangle\n\nsaveFrame(\"%s\")\nexit()\n"; | ||
referenceURI = "https://processing.org/reference/images/blue_.png"; | ||
} | ||
|
||
@Test | ||
public void test() { | ||
try { | ||
defaultOperation(); | ||
} catch (Exception exception) { | ||
System.err.println(exception); | ||
fail("Should not have thrown any exception"); | ||
} | ||
} | ||
} |
Oops, something went wrong.