Modifications

Sauter à la navigation Sauter à la recherche
Ligne 164 : Ligne 164 :  
There are two basic string drawing procedures for adding text. The first is just for a single character. You can place this character at any location and with any color. There’s only one font (to save on space) and it’s meant to be 5x8 pixels, but an optional size parameter can be passed which scales the font by this factor (e.g. size=2 will render the text at 10x16 pixels per character). It’s a little blocky but having just a single font helps keep the program size down.  
 
There are two basic string drawing procedures for adding text. The first is just for a single character. You can place this character at any location and with any color. There’s only one font (to save on space) and it’s meant to be 5x8 pixels, but an optional size parameter can be passed which scales the font by this factor (e.g. size=2 will render the text at 10x16 pixels per character). It’s a little blocky but having just a single font helps keep the program size down.  
   −
  void drawChar(uint16_t x, uint16_t y, char c, uint16_t color, uint8_t size);
+
void drawChar(uint16_t x, uint16_t y, char c, uint16_t color, uint8_t size);
    
[[Fichier:GLX-DrawChar1.jpg]]
 
[[Fichier:GLX-DrawChar1.jpg]]
Ligne 182 : Ligne 182 :  
After setting everything up, you can use print() or println() — just like you do with Serial printing! For example, to print a string, use print("Hello world") - that’s the first line of the image above. You can also use print() for numbers and variables — the second line above is the output of print(1234.56) and the third line is print(0xDEADBEEF, HEX).
 
After setting everything up, you can use print() or println() — just like you do with Serial printing! For example, to print a string, use print("Hello world") - that’s the first line of the image above. You can also use print() for numbers and variables — the second line above is the output of print(1234.56) and the third line is print(0xDEADBEEF, HEX).
   −
By default, long lines of text are set to automatically “wrap” back to the leftmost column. To override this behavior (so text will run off the right side of the display — useful for scrolling marquee effects), use setTextWrap(false). The normal wrapping behavior is restored with setTextWrap(true).  
+
By default, long lines of text are set to automatically “wrap” back to the leftmost column. To override this behavior (so text will run off the right side of the display — useful for scrolling marquee effects), use setTextWrap(false). The normal wrapping behavior is restored with setTextWrap(true).
    
=== Images ===
 
=== Images ===
29 917

modifications

Menu de navigation