This reference is for Processing 2.0+. If you have a previous version, use the reference included with your software. If you see any errors or have suggestions, please let us know. If you prefer a more technical reference, visit the Processing Javadoc.

Name | ### smooth()
Examples |
    background(0);
    noStroke();
    smooth();
    ellipse(30, 48, 36, 36);
    noSmooth();
    ellipse(70, 48, 36, 36);
Description | Draws all geometry with smooth (anti-aliased) edges. smooth() will also improve image quality of resized images. Note that smooth() is active by default; noSmooth() can be used to disable smoothing of geometry, images, and fonts. The level parameter increases the level of smoothness with the P2D and P3D renderers. This is the level of over sampling applied to the graphics buffer. The value "2" will double the rendering size before scaling it down to the display size. This is called "2x anti-aliasing." The value 4 is used for 4x anti-aliasing and 8 is specified for 8x anti-aliasing. If level is set to 0, it will disable all smoothing; it's the equivalent of the function noSmooth(). The maximum anti-aliasing level is determined by the hardware of the machine that is running the software. With the default renderer, smooth(2) is bilinear and smooth(4) is bicubic. Nothing implemented on Android 2D.
Syntax |
    smooth()
    smooth(level)
Parameters |
level | int: either 2, 4, or 8
Returns | void
Related | noSmooth() size()

Updated on May 19, 2014 05:30:01pm PDT