Smooth font and increase strokeWeight.
in
Programming Questions
•
1 year ago
Hi,
I've been trying to create a very simple code and loaded a font in it, but I don't know how to smooth it. I did use the "smooth" option and put "smooth();" in my void setup. I guess I'm making some dumb mistake again but I don't know how to fix this.
Second thing, I'd like my strokeWeight to increase by 1 everytime a new line is drawn. I don't really know how to do this either. Using ++ I guess, but how do I link this to the new line being draw every time?
Third problem, actually, when I try to paste my code here the entire markup is gone.
- never mind about that, using a different browser works fine.
- never mind about that, using a different browser works fine.
- int moveX, moveY;
PFont font;
void setup() {
size(1024, 678);
frameRate(20);
smooth();
background(255);
font = loadFont("BellMTItalic-48.vlw");
textFont(font);
}
void draw() {
textSize(60);
float m = millis()*0.13;
fill(0);
text("Rrefresh", width/100*63, height/100*105);
translate(width/2, height/2);
rotate(radians(m));
stroke(random(255), random(255), random(255));
strokeWeight(35);
line(0, 0, moveX, moveY);
moveX++;
moveY++;
}
void mousePressed() {
background(255);
moveX = 0;
moveY = 0;
}
1