-
-
Notifications
You must be signed in to change notification settings - Fork 4
textWidth_
villares edited this page May 24, 2020
·
4 revisions
PFont font;
font = loadFont("FFScala-32.vlw");
textFont(font, 32);
char c = 'T';
float cw = textWidth(c);
text(c, 0, 40);
line(cw, 0, cw, 50);
String s = "Tokyo";
float sw = textWidth(s);
text(s, 0, 85);
line(sw, 50, sw, 100); Calculates and returns the width of any character or text string.
textWidth(<font color="#996600">data</font>)Parâmetros data char or String
Float
Web & Applicações
A referência de Processing está sob a licença Creative Commons BY-NC conforme indicado aqui. Esta Wiki-tradução é baseada na tradução e adaptação para o Português do Brasil do professor Luiz Ernesto Merkle