blendman Utilisateur confirmé: Rang **
Messages : 433 Projet Actuel : Crée des jeux, logiciels, BD, Romans et nouvelles.
| Sujet: trouver la longueur d'un mot (string_length) Mer 2 Fév 2011 - 17:32 | |
| salut j'aimerai trouver la longueur d'un mot et afficher un cadre autour. Avec string_length, je trouve le nombre de lettre, mais par exemple un "i" et un "m" ne représente pas la même taille (en X), et donc mon cadre ne fonctionne pas. Vous savez comment je peux faire ça ? Merci |
|
DeinDall Utilisateur confirmé: Rang ****
Messages : 858 Localisation : Quimper
| Sujet: Re: trouver la longueur d'un mot (string_length) Mer 2 Fév 2011 - 17:37 | |
| utilise la police Courier New ( tous les caractères ont la même dimension... ) mais sinon, il faudra crée un script avec chaque dimensions de chaque lettres pour mesurer le string... |
|
Invité Invité
| Sujet: Re: trouver la longueur d'un mot (string_length) Mer 2 Fév 2011 - 18:15 | |
| oui, mais non. - Citation :
- string_width(string) Width of the string in the current font as it would be drawn using the draw_text() function. Can be used for precisely positioning graphics.
string_height(string) Height of the string in the current font as it would be drawn using the draw_text() function.
string_width_ext(string,sep,w) Width of the string in the current font as it would be drawn using the draw_text_ext() function. Can be used for precisely positioning graphics.
string_height_ext(string,sep,w) Height of the string in the current font as it would be drawn using the draw_text_ext() function.
|
|
blendman Utilisateur confirmé: Rang **
Messages : 433 Projet Actuel : Crée des jeux, logiciels, BD, Romans et nouvelles.
| Sujet: Re: trouver la longueur d'un mot (string_length) Mer 2 Fév 2011 - 19:50 | |
| effectivement string_width est pas mal , merci . |
|
Contenu sponsorisé
| Sujet: Re: trouver la longueur d'un mot (string_length) | |
| |
|