So I doubt what I want to be able to do is feasible on such hardware but I figured I’d ask about it and maybe work on some solutions and alternative options.
The most common thing I’d like to be able to do with my panel is to display an SVG icon on a background (likely flat color to make things easier). I assume I could simply convert the SVG to be a bitmap and load that from the SD card but it would be nice to have a bit more control for animation purposes.
Ideally I’d like to be able to call
backgroundLayer.drawPath(svgPath, x, y, rotation, scale); or
backgroundLayer.fillPath(svgPath, x, y, rotation, scale); where
(x,y) defines the origin and
svgPath is a string defining an SVG style path such as
M10,20V14H14V20H19V12H22L12,3L2,12H5V20H10Z. For fun/practice I’m considering programming an interpreter which draws the SVG as lines but I’m not sure how the curves or fill would be implemented. It would probably need to be done pixel by pixel and I’m assuming that is what is used for the current geometries though perhaps altering the buffer directly rather than wasting instructions calling
drawPixel. I haven’t had time to look into the code at all but perhaps some thoughts can be shared on the topic of SVG support.
As far as I can see, there isn’t support for anti-aliasing currently? It seems like it would be reasonably simple to implement basic anti-aliasing by using a weighted average of the current pixel color and the new pixel color to give the illusion of transparency. I believe this would cause issues where multiple anti-aliased drawings overlap closely and have vastly different colors though for most cases this shouldn’t matter. This would of course be an option which is disabled by default.
Perhaps another solution could be to apply a small blur to the image. Is this supported at all?