Answers for "processing how to do dotted dashed line"

0

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;
    }        
  }    
} 
Posted by: Guest on April-09-2020

Browse Popular Code Answers by Language