(一)通过processing生成基础图形
发布时间
阅读量:
阅读量
设计一个窗口界面并在该界面上渲染基础图形元素:
class DrawShape{
DrawShape(){
}
void draw_line(){
int R = int(random(255));
int G = int(random(255));
int B = int(random(255));
stroke(R, G, B, 255);
if(mousePressed){
line(10, height/5, width/3-10, height/5);
}
}
void draw_triangle(){
int R = int(random(255));
int G = int(random(255));
int B = int(random(255));
stroke(R, G, B, 255);
if(mousePressed){
noFill();
triangle(width/2, height/8, width/1.5-10, height/3, wid
全部评论 (0)
还没有任何评论哟~
