From c0f0e77880984c7e70394c4c6e9280e6475e3c26 Mon Sep 17 00:00:00 2001 From: W Sanders Date: Tue, 10 Jun 2025 12:39:26 -0700 Subject: [PATCH] Update Sprite_drawPixel.ino Revised for M5Unified, M5Canvas --- .../Display/Sprite/Sprite_drawPixel/Sprite_drawPixel.ino | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/examples/Advanced/Display/Sprite/Sprite_drawPixel/Sprite_drawPixel.ino b/examples/Advanced/Display/Sprite/Sprite_drawPixel/Sprite_drawPixel.ino index ae4c6461..469caa39 100644 --- a/examples/Advanced/Display/Sprite/Sprite_drawPixel/Sprite_drawPixel.ino +++ b/examples/Advanced/Display/Sprite/Sprite_drawPixel/Sprite_drawPixel.ino @@ -32,9 +32,9 @@ #define WIDTH 128 #define HEIGHT 128 -#include +#include -TFT_eSprite spr = TFT_eSprite(&M5.Lcd); +M5Canvas spr(&M5.Lcd); void setup() { Serial.begin(250000); @@ -78,7 +78,8 @@ void loop(void) { // Draw some text with Middle Centre datum spr.setTextDatum(MC_DATUM); - spr.drawString("Sprite", WIDTH / 2, HEIGHT / 2, 4); + spr.drawString("Sprite", WIDTH / 2, HEIGHT / 2, &fonts::Font4); + //spr.drawString("Sprite", WIDTH / 2, HEIGHT / 2, 4); // Now push the sprite to the TFT at position 0,0 on screen spr.pushSprite(-40, -40);