Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/Basics/BasicOperations/BasicOperations.rpde
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ ellipse(56, 46, 55, 55)

quad(38, 31, 86, 20, 69, 63, 30, 76)

bezierDetail(as.integer(12))
bezierDetail(12)

bezier(85, 20, 10, 10, 90, 90, 15, 80)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
settings <- function() {
size(500, 500, "processing.opengl.PGraphics3D")
size(500, 500, P3D)
}

setup <- function() {
colorMode(as.integer(1), 1)
colorMode(1, 1)
frameRate(24)
}

Expand Down
26 changes: 23 additions & 3 deletions src/rprocessing/applet/BuiltinApplet.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,26 @@ public void size(double width, double height, StringVector renderer) {
super.size((int) width, (int) height, renderer.asString());
}

public void bezierDetail(double detail) {
super.bezierDetail((int) detail);
}

public void colorMode(double mode) {
super.colorMode((int) mode);
}

public void colorMode(double mode, float max) {
super.colorMode((int) mode, max);
}

public void colorMode(double mode, float max1, float max2, float max3) {
super.colorMode((int) mode, max1, max2, max3);
}

public void colorMode(double mode, float max1, float max2, float max3, float maxA) {
super.colorMode((int) mode, max1, max2, max3, maxA);
}

public double frameCount() {
return super.frameCount;
}
Expand Down Expand Up @@ -128,9 +148,9 @@ protected void wrapKeyVariables() {
if (lastKey != key) {
lastKey = key;
/*
* If key is "CODED", i.e., an arrow key or other non-printable, pass that
* value through as-is. If it's printable, convert it to a unicode string,
* so that the user can compare key == 'x' instead of key == ord('x').
* If key is "CODED", i.e., an arrow key or other non-printable, pass that value through
* as-is. If it's printable, convert it to a unicode string, so that the user can compare key
* == 'x' instead of key == ord('x').
*/
final char pyKey = key == CODED ? parseChar(Integer.valueOf(key)) : parseChar(key);
this.renjinEngine.put("key", pyKey);
Expand Down