GamebuinoClassic archive

Archive of the Gamebuino Classic wiki, recovered from the Wayback Machine (capture 2023-09-27). Read-only.

gb.display.drawChar

Description

Draws a character at a specified location. The font is defined using gb.display.setFont. If you specify values that cause parts of the char to be off screen, then parts will not be rendered.

Syntax

gb.display.drawChar(x, y, char, size);

Parameters

Returns

none

Example

   #include <SPI.h>
   #include <Gamebuino.h>
   Gamebuino gb;
   extern const byte font5x7[]; //use the font5x7 for uppercase letters
   void setup(){
     gb.begin();
     gb.display.setFont(font5x7); 
   }
   void loop(){
     if(gb.update()){
         gb.display.drawChar(10, 10,  90, 3);  // 90 =Z (DECIMAL char)
      }
   }

See also