Modifications

Sauter à la navigation Sauter à la recherche
Ligne 180 : Ligne 180 :  
  void setTextWrap(boolean w);
 
  void setTextWrap(boolean w);
   −
Begin with setCursor(x, y), which will place the top left corner of the text wherever you please. Initially this is set to (0,0) (the top-left corner of the screen). Then set the text color with setTextColor(color) — by default this is white. Text is normally drawn “clear” — the open parts of each character show the original background contents, but if you want the text to block out what’s underneath, a background color can be specified as an optional second parameter to setTextColor(). Finally, setTextSize(size) will multiply the scale of the text by a given integer factor. Below you can see scales of 1 (the default), 2 and 3. It appears blocky at larger sizes because we only ship the library with a single simple font, to save space.  
+
Il faut commencer avec setCursor(x, y), qui place la position du coin supérieur-gauche du texte à afficher. Par défaut, cette position est en (0,0) (Le coin supérieur-gauche de l'écran). par la suite, la fonction setTextColor(color) permet d'initialiser la couleur du texte par défaut, c'est blanc (''white'' en anglais). Le texte est normalement rendu en mode “clear” — les partie ouvertes/vide de chaque caractères affiche le contenu original de l'arrière plan. Cependant, si vous désirez afficher un texte sur un fond plein (cachant le contenu de l'arrière plan), la fonction setTextColor() peut accepter un second paramètre optionnel.  
 +
 
 +
Finalement, setTextSize(size) multipliera l'échelle d'affichage du test par un facteur entier. Sur l'image ci-dessous, vous pouvez constater l'échelle 1 (par défaut), 2 et 3. It appears blocky at larger sizes because we only ship the library with a single simple font, to save space.  
    
[[Fichier:GLX-DrawChar2.jpg]]
 
[[Fichier:GLX-DrawChar2.jpg]]
29 917

modifications

Menu de navigation