mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
fix for rounded rect max radii (issue #813)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user