⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 brightness.pde

📁 This is processing for java examples.
💻 PDE
字号:
/** * Brightness  * by Rusty Robison.  *  * Brightness is the relative lightness or darkness of a color. * Move the cursor vertically over each bar to alter its brightness.  */ int barWidth = 5;int[] brightness;void setup() {  size(200, 200);  colorMode(HSB, 360, height, height);    brightness = new int[width/barWidth];}void draw() {  int j = 0;  for (int i = 0; i <= (width-barWidth); i += barWidth) {      noStroke();    if ((mouseX > i) && (mouseX < i+barWidth)) {      brightness[j] = mouseY;    }    fill(i, height, brightness[j]);    rect(i, 0, barWidth, height);      j++;  }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -