Processing資料(8) 文字
- 2. text
void setup() {
size(400, 400);
}
void draw() {
background(255, 255, 255);
fill(0, 0, 0);
textSize(50);
text("abcdefg", width/2, height/2);
}
- 3. void draw() {
background(255, 255, 255);
fill(0, 0, 0);
textSize(50);
text("abcdefg", width/2, height/2);
stroke(255, 0, 0);
strokeWeight(2);
line(width/2, 0, width/2, height);
line(0, height/2, width, height/2);
}
- 4. fill(0, 0, 0);
textSize(50);
textAlign(RIGHT);
text("abcdefg", width/2, height/2);
fill(0, 0, 0);
textSize(50);
textAlign(CENTER);
text("abcdefg", width/2, height/2);