當前位置: 首頁>>編程示例 >>用法及示例精選 >>正文


Processing noSmooth()用法及代碼示例

Processing, noSmooth()用法介紹。

用法

  • noSmooth()

返回

  • void

說明

當放大而不是插值像素時,繪製所有具有鋸齒(鋸齒)邊的幾何圖形和字體以及像素之間具有硬邊的圖像。注意smooth()默認是激活的,所以需要調用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.

例子

size(400, 400);
noSmooth();
noStroke();
background(0);
ellipse(120, 192, 144, 144);
ellipse(280, 192, 144, 144);
Image output for example 1

相關用法


注:本文由純淨天空篩選整理自processing.org大神的英文原創作品 noSmooth()。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。