Skip to content

reference: Add Color #203

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 16 commits into from
Aug 8, 2017
Merged
Prev Previous commit
Next Next commit
reference: Add lerpColor
Signed-off-by: Ce Gao <ce.gao@outlook.com>
  • Loading branch information
gaocegege committed Aug 8, 2017
commit 3b57c0e5024f17ee3ad1b0f6ac06c8adb33c9640
2 changes: 2 additions & 0 deletions examples/reference/lerpColor/lerpColor1/.test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
test:
reference: https://processing.org/reference/images/lerpColor_.png
14 changes: 14 additions & 0 deletions examples/reference/lerpColor/lerpColor1/lerpColor1.rpde
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)
25 changes: 25 additions & 0 deletions src/test/e2e/core/function/LerpColor1Test.java
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 LerpColor1Test extends E2eTestBase {

public LerpColor1Test() {
coreCodeTemplate = "stroke(255)\nbackground(51)\nfrom = color(204, 102, 0)\nto = color(0, 102, 153)\ninterA = lerpColor(from, to, 0.33)\ninterB = lerpColor(from, to, 0.66)\nfill(from)\nrect(10, 20, 20, 60)\nfill(interA)\nrect(30, 20, 20, 60)\nfill(interB)\nrect(50, 20, 20, 60)\nfill(to)\nrect(70, 20, 20, 60)\n\nsaveFrame(\"%s\")\nexit()\n";
referenceURI = "https://processing.org/reference/images/lerpColor_.png";
}

@Test
public void test() {
try {
defaultOperation();
} catch (Exception exception) {
System.err.println(exception);
fail("Should not have thrown any exception");
}
}
}