I want to draw bitmap (buffer) data directly with inlineC and noticed that the method Graphics.drawImage() used the setPixel(...) to draw the bitmap (buffer) data at last in jswrap_graphics.c, but the method Graphics.drawString() is called graphicsFillRect() and graphicsFillRectDevice to draw and returned return gfx->fillRect(gfx, (int)x1, (int)y1, (int)x2, (int)y2, col), Why this way? What's the difference between the two and which one is more efficient to draw bitmap data?
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
I want to draw bitmap (buffer) data directly with inlineC and noticed that the method Graphics.drawImage() used the setPixel(...) to draw the bitmap (buffer) data at last in jswrap_graphics.c, but the method Graphics.drawString() is called
graphicsFillRect()
andgraphicsFillRectDevice
to draw and returnedreturn gfx->fillRect(gfx, (int)x1, (int)y1, (int)x2, (int)y2, col)
, Why this way? What's the difference between the two and which one is more efficient to draw bitmap data?