mirror of
https://github.com/processing/processing4.git
synced 2026-02-03 13:49:18 +01:00
added MAX_POINT_ACCURACY constant to cap number of segments used when
drawing an ellipse
This commit is contained in:
@@ -4552,9 +4552,10 @@ public class PShapeOpenGL extends PShape {
|
||||
int perim;
|
||||
if (0 < size) { // round point
|
||||
weight = +size / 0.5f;
|
||||
perim = PApplet.max(PGraphicsOpenGL.MIN_POINT_ACCURACY,
|
||||
perim = PApplet.min(PGraphicsOpenGL.MAX_POINT_ACCURACY,
|
||||
PApplet.max(PGraphicsOpenGL.MIN_POINT_ACCURACY,
|
||||
(int) (TWO_PI * weight /
|
||||
PGraphicsOpenGL.POINT_ACCURACY_FACTOR)) + 1;
|
||||
PGraphicsOpenGL.POINT_ACCURACY_FACTOR))) + 1;
|
||||
} else { // Square point
|
||||
weight = -size / 0.5f;
|
||||
perim = 5;
|
||||
|
||||
Reference in New Issue
Block a user