201707-03 width宽度 18.width Name(名称):width //宽度 Examples(例子): noStroke(); background(0); rect(0, 40, width, 20); rect(0, 60, width/2, 20); Description(描述):System variable that stor.... Read More >
201707-03 smooth()平滑函数 17.smooth() Name(名称):smooth()//平滑函数 Examples(例子): void setup() { size(100, 100); smooth(2); noStroke(); } void draw() { background(0); ellipse(30, 48, 3.... Read More >
201707-03 size()画布尺寸 16.size() Name(名称):size()//画布尺寸 Examples(例子): size(200, 100); background(153); line(0, 0, width, height); Description(描述):Defines the dimension of the display window .... Read More >
201707-03 settings()特殊情况下的设置 15.settings() Name(名称):settings()//特殊情况下的设置 Examples(例子): // Run code at full screen using the default renderer使用默认渲染器在全屏运行代码 int x = 0; void settings() { fullScreen(); .... Read More >
201707-03 pixelWidth高分辨率显示屏像素宽度 13.pixelHeight 14.pixelWidth Name(名称):pixelHeight //高分辨率显示屏像素高度 Examples(例子): size(600, 400); pixelDensity(2); println(width, height); println(pixelWidth, pixelHeight); &.... Read More >
201707-03 pixelHeight高分辨率显示屏像素高度 13.pixelHeight 14.pixelWidth Name(名称):pixelHeight //高分辨率显示屏像素高度 Examples(例子): size(600, 400); pixelDensity(2); println(width, height); println(pixelWidth, pixelHeight); D.... Read More >
201707-03 pixelDensity()高分辨率显示屏启用 pixelDensity() Name(名称):pixelDensity()//高分辨率显示屏启用 Examples(例子): size(100, 100); pixelDensity(2); noStroke(); background(0); ellipse(30, 48, 36, 36); ellipse(70, 48,.... Read More >
201707-03 noSmooth()取消平滑 noSmooth() Name(名称):noSmooth()//取消平滑 Examples(例子): size(100, 100); noSmooth(); noStroke(); background(0); ellipse(30, 48, 36, 36); ellipse(70, 48, 36, 36); .... Read More >
201707-03 noCursor()窗口隐藏鼠标指针 10.noCursor() Name(名称):noCursor()//窗口隐藏鼠标指针 Examples(例子): // Press the mouse to hide the cursor按下鼠标来隐藏光标 void draw() { if (mousePressed == true) { noCursor(); }.... Read More >
201707-03 height高度 9.height Name(名称):height //高度 Examples(例子): noStroke(); background(0); rect(40, 0, 20, height); rect(60, 0, 20, height/2); Description(描述):System variable that sto.... Read More >
201707-03 fullScreen()全屏 8.fullScreen() Name(名称):fullScreen()//全屏 Examples(例子): 例子一 // Run the code at the full dimensions of the screen currently在当前的屏幕上运行代码 // selected inside the Preferences window在Pr.... Read More >
201707-03 frameRate帧速率 7.frameRate Name(名称):frameRate //程序的大致帧速率 Examples(例子): void setup() { frameRate(30); } void draw() { line(0, 0, width, height); println(fra.... Read More >
201707-03 frameRate()帧速率函数 6.frameRate() Name(名称):frameRate()//帧速率 Examples(例子): void setup() { frameRate(4); } int pos = 0; void draw() { background(204); pos++; line(pos, 20, pos, 80); .... Read More >
201707-03 frameCount帧数 frameCount Name(名称):frameCount //帧数 Examples(例子): void setup() { frameRate(30); } void draw() { line(0, 0, width, height); println(frameCount); } Descript.... Read More >
201707-03 focused检查程序是否接受鼠标或者键盘输入 focused Name(名称):focused //检查程序是否接受鼠标或者键盘输入 Examples(例子): if (focused) { // or "if (focused == true)" ellipse(25, 25, 50, 50); } else { line(0, 0, 100, 100); line(100, 0, .... Read More >
201707-03 displayDensity()显示屏密度判断函数 3.displayDensity() Name(名称):displayDensity()//显示屏密度判断函数 Examples(例子): void setup() { size(100, 100); pixelDensity(displayDensity()); noStroke(); } void draw() { b.... Read More >
201707-03 delay()延迟 2.delay() Name(名称):delay() //延迟 Examples(例子): import processing.serial.*; Serial myPort; // The serial port串行端口 void setup() { printArray(Serial.list()); .... Read More >