<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[M5Dial and graphics and canvas and sprite: why so hard to figure out??]]></title><description><![CDATA[<p dir="auto">I am trying to do sprites or canvas or something in the M5 Dial and had a hell of a time getting it to work.  In the end I am not sure I did it right.</p>
<p dir="auto">I see things about canvas and sprites but I don't know the relationship, and I can't figure out what is a M5Dial call, M5Canvas or what.</p>
<p dir="auto">In the end I did:</p>
<p dir="auto">M5GFX display;<br />
M5Canvas canvas(&amp;display);</p>
<p dir="auto">then followed with:<br />
auto cfg = M5.config();<br />
M5Dial.begin(cfg, true, true);<br />
display.begin();</p>
<p dir="auto">seems inconsistent but worked.</p>
<p dir="auto">In my loop I did:<br />
display.startWrite();<br />
canvas.createSprite(240, 240);<br />
canvas.fillScreen(0xABE1);<br />
canvas.setTextColor(WHITE);<br />
canvas.setTextDatum(middle_center);<br />
canvas.setFont(&amp;fonts::Orbitron_Light_32);<br />
canvas.setTextSize(1);<br />
canvas.drawString("The Title", M5Dial.Display.width() / 2, 15);<br />
canvas.pushSprite(0,0);<br />
display.endWrite();</p>
<p dir="auto">In the rest of my code I always did stuff like:<br />
M5Dial.Display.drawString("To Print", 30, 90);</p>
<p dir="auto">Are there M5Dial.Display equivalents to what I am trying to do?</p>
<p dir="auto">The display is silky smooth without flickering now but I don't quite get it.</p>
]]></description><link>https://community.m5stack.com/topic/6095/m5dial-and-graphics-and-canvas-and-sprite-why-so-hard-to-figure-out</link><generator>RSS for Node</generator><lastBuildDate>Wed, 29 Apr 2026 19:12:17 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/6095.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 16 Feb 2024 04:58:32 GMT</pubDate><ttl>60</ttl></channel></rss>