I'm getting some very nasty JAVA2D glitches after recent updates to Lion's Java JVM. Where you would expect smooth shape outlines, I'm getting variably jagged outlines. I've confirmed that these issues aren't present on 1.5 JVMs, or on any 1.6 JVM releases prior to Jan 2012 or so.
Here's a minimal test case:
- float angle = 0;
- void setup() {
- size (600, 600, JAVA2D);
- strokeWeight(10);
- noFill();
- stroke(255);
- }
- void draw() {
- background (0);
- beginShape();
- for (float theta = 0; theta < angle % 360; theta += 0.1) {
- float x = 200 * cos(radians(theta)) + 300;
- float y = 200 * sin(radians(theta)) + 300;
- vertex(x, y);
- }
- endShape();
- angle++;
- }
And here's the output I'm seeing on Lion. Same issue with either the 1.6.0_31 or 1.6.0_29 JVMs, and Processing 1.5.1 vs 2.0a5 doesn't make a difference either. This same code produces a perfect circle on earlier JVMs:
Any ideas? Looks like a JVM bug but I haven't been able to find a work-around.
This is a possibly related post from a few months ago: