processing how to do dotted dashed line code example
Example: processing how to do dotted dashed line
void setup(){
size(500,200);
}
void draw(){
boolean dash = true;
frame.setTitle(int(frameRate) + " fps");
for(int y = 0; y < height; y+=2){
for(int i = 0; i < width; i+=2){
if (dash) stroke(0);
else stroke(255);
line(i, y, i+5, y);
dash = !dash;
}
}
}