Search processing.org:

Reference for Processing version 1.0+. If you have a previous version, use the reference included with your software. If you see any errors or have any comments, let us know.

Name

### smooth()

Examples

    background(0);
    ellipse(30, 48, 36, 36);
    smooth();
    ellipse(70, 48, 36, 36);

Description

Draws all geometry with smooth (anti-aliased) edges. This will slow down the frame rate of the application, but will enhance the visual refinement.
Note that smooth() will also improve image quality of resized images, and noSmooth() will disable image (and font) smoothing altogether.
Starting in Processing 1.0, smoothing is always enabled with the OPENGL renderer setting. The smooth() and noSmooth() methods are ignored. See the hint() reference for information on disabling smoothing with OpenGL.
In the current release, smoothing is imperfect with the P2D and P3D renderers. In some situations, drawing with smooth() will create small hairlines inside filled shapes or inaccuracies with shape depth can cause odd visual artifacts at the edges of shapes.

Syntax

    smooth()

Returns | None
Usage | Web & Application
Related | noSmooth() hint() size()

Updated on February 26, 2009 06:12:35pm PST