FAQ
 
 
Cover  \ Exhibition  \ Learning  \ Reference  \ Download  \ Discourse   
      Linguagem \ Ambiente \ Bibliotecas \ Comparação
 
   
   
Resumida (A-Z) \ Completa (A-Z)  
   
  Referência para Processing (BETA) version 91+. Se você tem uma versão anterior, utilize a documentação inclusa em seu software. Se você encontrar quaisquer erros ou tiver quaisquer comentários, leve ao nosso conhecimento.  
Nome  

textWidth()

   
Exemplos  
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); 
Descrição   Calculates and returns the width of any character or text string.
   
Sintaxe  
textWidth(data)
   
Parâmetros  
data   char or String

   
Retorno   Float
   
Utilização   Web & Applicações
   
Relacionado   loadFont()
PFont
text()
textFont()
 
 






   
 
Original em inglês atualizado em: Fri Jul 15 16:36:15 PDT 2005
Tradução para o Português do Brasil: Luiz Ernesto Merkle
Atuallizada em: 30 de novembro de 2005, 9h00 (BRST)
 
 








Creative Commons License
 
  Processing é um projeto aberto iniciado por Ben Fry e Casey Reas  
  © Info