Ce que fait la commande
TextTotalWidth prend iTextIndex (un entier), et rend un flottant. iTextIndex est l'identifiant d'un objet Text, celui que CreateText a rendu : c'est ainsi que l'appel sait sur quoi agir.
Syntaxe
TextTotalWidth(iTextIndex integer) → floatParamètres
| Nom | Type |
|---|---|
| iTextIndex | integer |
Chaque forme rend
float
Exemple · engendré
text = CreateText("hello")DO Print(TextTotalWidth(text)) Sync()LOOPCreateText est là pour donner à l'appel quelque chose sur quoi agir : TextTotalWidth est la ligne qui compte. La boucle DO … LOOP n'est pas décorative : un programme BASIC classique s'arrête dès qu'il n'a plus de lignes, et c'est Sync() qui dessine l'image.