201708-08 hue()色调值 Namehue()色调值 Examples noStroke(); colorMode(HSB, 255); color c = color(0, 126, 255); fill(c); rect(15, 20, 35, 60); float value = hue(c); // .... Read More >
201708-08 green()绿色值 Namegreen()绿色值 Examples color c = color(20, 75, 200); // Define color 'c' fill(c); // Use color variable 'c' as fill color rect(15, 20, 35, .... Read More >
201708-08 color()颜色类型 Name color()颜色类型 Examples color c = color(255, 204, 0); // Define color 'c' fill(c); // Use color variable 'c' as fill.... Read More >
201708-08 brightness()颜色的亮度值 Namebrightness()颜色的亮度值 Examples noStroke(); colorMode(HSB, 255); color c = color(0, 126, 255); fill(c); rect(15, 20, 35, 60); float value = br.... Read More >
201708-08 blue()蓝色值 Nameblue()蓝色值 Examples color c = color(175, 100, 220); // Define color 'c' fill(c); // Use color variable 'c' as fill color rect(15, 20, 35,.... Read More >
201708-08 alpha()颜色的透明度值 Namealpha()颜色的透明度值 Examples noStroke(); color c = color(0, 126, 255, 102); fill(c); rect(15, 15, 35, 70); float value = alpha(c); // Sets 'va.... Read More >
201708-08 stroke()描边 Namestroke()描边 Examples stroke(153); rect(30, 20, 55, 55); stroke(204, 102, 0); rect(30, 20, 55, 55);DescriptionSets the color used to.... Read More >
201708-08 noStroke()禁用描边 NamenoStroke()禁用描边 Examples noStroke(); rect(30, 20, 55, 55);DescriptionDisables drawing the stroke (outline). If both noStroke() and noFill().... Read More >
201708-08 noFill()不填充 NamenoFill()不填充 Examples rect(15, 10, 55, 55); noFill(); rect(30, 20, 55, 55);DescriptionDisables filling geometry. If both noStroke() and noF.... Read More >
201708-08 fill()填充颜色 Namefill()填充颜色 Examples fill(153); rect(30, 20, 55, 55); fill(204, 102, 0); rect(30, 20, 55, 55);DescriptionSets the color used to fil.... Read More >
201708-08 colorMode()颜色模式 NamecolorMode()颜色模式 Examples noStroke(); colorMode(RGB, 100); for (int i = 0; i < 100; i++) { for (int j = 0; j < 100; j++) { stro.... Read More >
201708-08 clear()清空 Nameclear()清空 ExamplesPGraphics pg; void setup() { size(200, 200); pg = createGraphics(100, 100); } void draw() { background(204); pg.beginDraw(); pg.stroke(0, 102, 153); pg.line(0, 0.... Read More >
201708-08 background()背景 Namebackground()背景 Examples background(51); background(255, 204, 0); PImage img; img = loadImage("laDefense.jpg"); background(.... Read More >
201708-07 specular()镜面 Namespecular()镜面 Examples size(100, 100, P3D); background(0); noStroke(); background(0); fill(0, 51, 102); lightSpecular(255, 255, 255); direc.... Read More >
201708-07 shininess()光泽度 Nameshininess()光泽度 Examples size(100, 100, P3D); background(0); noStroke(); background(0); fill(0, 51, 102); ambientLight(102, 102, 102); l.... Read More >
201708-07 emissive()发射率 Nameemissive()发射率 Examples size(100, 100, P3D); background(0); noStroke(); background(0); directionalLight(204, 204, 204, .5, 0, -1); emissive.... Read More >
201708-07 ambient()环境反射率 Nameambient()环境反射率 Examples size(100, 100, P3D); background(0); noStroke(); directionalLight(153, 153, 153, .5, 0, -1); ambientLight(153, 102,.... Read More >
201708-07 screenZ()屏幕Z坐标 NamescreenZ()屏幕Z坐标 Examplesvoid setup() { size(100, 100, P3D); } void draw() { background(204); float x = mouseX; float y = mouseY; float z = -100; // Draw "X" at z = -100 str.... Read More >