smooth() method different levels
in
Core Library Questions
•
8 months ago
Hi All,
I have been checking some code for a project of mine and saw something interesting in PApplet and PGraphics classes related with smooth() methods
Below is the piece of code from PAppplet.java
public void smooth() {
if (recorder != null) recorder.smooth();
g.smooth();
}
public void smooth(int level) {
if (recorder != null) recorder.smooth(level);
g.smooth(level);
}
Here both g and recorder objects are instances of PGraphics.java class and in that class, here are the smooth methods:
public void smooth() {
smooth = true;
}
/**
*
* @param level either 2, 4, or 8
*/
public void smooth(int level) {
smooth = true;
}
Basically, setting different levels of smooth does not seem to be working. I have tried to put different numbers like 32 64 8 and so on but result didnt change at all. and as you can check the api page on http://processing.org/reference/smooth_.html it says smoothing levels should be working, but simply it is does not.
can anyone explain why the pieces of code above dont do anything with the levels although it is written in the API?
I have been checking some code for a project of mine and saw something interesting in PApplet and PGraphics classes related with smooth() methods
Below is the piece of code from PAppplet.java
public void smooth() {
if (recorder != null) recorder.smooth();
g.smooth();
}
public void smooth(int level) {
if (recorder != null) recorder.smooth(level);
g.smooth(level);
}
Here both g and recorder objects are instances of PGraphics.java class and in that class, here are the smooth methods:
public void smooth() {
smooth = true;
}
/**
*
* @param level either 2, 4, or 8
*/
public void smooth(int level) {
smooth = true;
}
Basically, setting different levels of smooth does not seem to be working. I have tried to put different numbers like 32 64 8 and so on but result didnt change at all. and as you can check the api page on http://processing.org/reference/smooth_.html it says smoothing levels should be working, but simply it is does not.
can anyone explain why the pieces of code above dont do anything with the levels although it is written in the API?
1