Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

executable file 24 lines (23 sloc) 0.547 kB
/**
* Draw a nice looking grid
*/
void drawBackground(float width, float height) {
background(255,255,252);
strokeWeight(1);
fill(0);
// fine grid
stroke(235);
float x, y;
for (x = -width; x < width; x += 10) {
line(x,-height,x,height); }
for (y = -height; y < height; y += 10) {
line(-width,y,width,y); }
// coarse grid
stroke(208);
for (x = -width; x < width; x += 100) {
line(x,-height,x,height); }
for (y = -height; y < height; y += 100) {
line(-width,y,width,y); }
// reset to black
stroke(0);
}
Jump to Line
Something went wrong with that request. Please try again.