This reference is for Processing 3.0+. If you have a previous version, use the reference included with your software in the Help menu. If you see any errors or have suggestions, please let us know. If you prefer a more technical reference, visit the Processing Core Javadoc and Libraries Javadoc.
Name | noSmooth() |
---|---|
Examples | size(100, 100); noSmooth(); noStroke(); background(0); ellipse(30, 48, 36, 36); ellipse(70, 48, 36, 36); void setup() { size(100, 100, P2D); noSmooth(); noStroke(); } void draw() { background(0); ellipse(30, 48, 36, 36); ellipse(70, 48, 36, 36); } |
Description | Draws all geometry and fonts with jagged (aliased) edges and images with hard edges between the pixels when enlarged rather than interpolating pixels. Note that smooth() is active by default, so it is necessary to call noSmooth() to disable smoothing of geometry, fonts, and images. Since the release of Processing 3.0, the noSmooth() function can only be run once for each sketch, either at the top of a sketch without a setup(), or after the size() function when used in a sketch with setup(). See the examples above for both scenarios. |
Syntax | noSmooth() |
Returns | void |
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.