Skip to content

Commit 62f6524

Browse files
authored
removing unnecessary changes.
1 parent 05ad75c commit 62f6524

1 file changed

Lines changed: 6 additions & 24 deletions

File tree

lib/empty-example/sketch.js

Lines changed: 6 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,7 @@
11
function setup() {
2-
createCanvas(300, 200);
3-
background(240);
4-
5-
textSize(32);
6-
textAlign(CENTER,CENTER);
7-
textFont('Georgia');
8-
9-
let txt = "Hello, \nWorld!";
10-
// Compute the bounding box based on the font's intrinsic metrics
11-
let bounds = fontBounds(txt, 50, 50);
12-
13-
fill(0);
14-
text(txt, 50, 50);
15-
16-
noFill();
17-
stroke('green');
18-
rect(bounds.x, bounds.y, bounds.w, bounds.h);
19-
20-
noStroke();
21-
fill(50);
22-
textSize(15);
23-
text("Font Bounds: x=" + bounds.x.toFixed(1) + ", y=" + bounds.y.toFixed(1) +
24-
", w=" + bounds.w.toFixed(1) + ", h=" + bounds.h.toFixed(1), 78, 100);
25-
}
2+
// put setup code here
3+
}
4+
5+
function draw() {
6+
// put drawing code here
7+
}

0 commit comments

Comments
 (0)