fix for #3113 noSmooth() issues

This commit is contained in:
Ben Fry
2015-04-25 03:27:51 -04:00
parent 1b37e087d7
commit cdfe575ea2
3 changed files with 13 additions and 6 deletions

View File

@@ -1439,9 +1439,9 @@ public class PGraphicsJava2D extends PGraphics {
@Override
public void smooth(int antialias) {
this.quality = antialias;
if (antialias == 0) {
public void smooth(int quality) {
this.quality = quality;
if (quality == 0) {
noSmooth();
} else {
smooth();
@@ -1452,6 +1452,7 @@ public class PGraphicsJava2D extends PGraphics {
@Override
public void noSmooth() {
smooth = false;
quality = 0; // Github 3113
g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
RenderingHints.VALUE_ANTIALIAS_OFF);
g2.setRenderingHint(RenderingHints.KEY_INTERPOLATION,