diff --git a/android/core/src/processing/core/PGraphics.java b/android/core/src/processing/core/PGraphics.java index 2a7faffc0..e034b4643 100644 --- a/android/core/src/processing/core/PGraphics.java +++ b/android/core/src/processing/core/PGraphics.java @@ -1574,6 +1574,12 @@ public class PGraphics extends PImage implements PConstants { float temp = b; b = d; d = temp; } + float maxRounding = PApplet.min((c - a) / 2, (d - b) / 2); + if (tl > maxRounding) tl = maxRounding; + if (tr > maxRounding) tr = maxRounding; + if (br > maxRounding) br = maxRounding; + if (bl > maxRounding) bl = maxRounding; + rectImpl(a, b, c, d, tl, tr, br, bl); } diff --git a/core/src/processing/core/PGraphics.java b/core/src/processing/core/PGraphics.java index d6be0a01c..ae267cd34 100644 --- a/core/src/processing/core/PGraphics.java +++ b/core/src/processing/core/PGraphics.java @@ -1993,6 +1993,12 @@ public class PGraphics extends PImage implements PConstants { float temp = b; b = d; d = temp; } + float maxRounding = PApplet.min((c - a) / 2, (d - b) / 2); + if (tl > maxRounding) tl = maxRounding; + if (tr > maxRounding) tr = maxRounding; + if (br > maxRounding) br = maxRounding; + if (bl > maxRounding) bl = maxRounding; + rectImpl(a, b, c, d, tl, tr, br, bl); } diff --git a/core/todo.txt b/core/todo.txt index 9c0237fc4..6f3e8a4ec 100644 --- a/core/todo.txt +++ b/core/todo.txt @@ -1,4 +1,7 @@ 0202 core +X Rounded rect() does not have a maximum length for corner radius +X http://code.google.com/p/processing/issues/detail?id=813 + _ video problem with P3D