This is a basic example how to draw a bitmap on Pokitto screen

Dependencies:   PokittoLib

/media/uploads/Pokitto/img_20180101_122531.jpg

Pokitto drawBitmap basic example

The bitmap was created with Photoshop (but you can use any similar drawing program) and converted to a .h resource file using Filippos img2pok tool, available here: https://github.com/Effer/img2pok

To try it out yourself

Just press the "Import into compiler" button on top right of this page!

Revision:
0:9783d85b2a06
Child:
2:5ef3dd229260
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bitmap.cpp	Mon Jan 01 10:22:35 2018 +0000
@@ -0,0 +1,21 @@
+/* Pokitto drawBitmap example - draws a Pokitto icon by @trelemar */
+
+#include "Pokitto.h" // include Pokitto library
+#include "pokitto_icon.h" // include the Pokitto icon graphics file
+
+Pokitto::Core mygame; //create Pokitto application instance
+
+int main () {
+    mygame.begin(); // start the application
+    mygame.display.load565Palette(pokitto_icon_pal); //load the palette for the image
+    /* the "while" loop runs as long as the program is running */
+    while (mygame.isRunning()) {
+        /* mygame.update() is processed whenever it is time to update the screen */
+        if (mygame.update()) {
+            mygame.display.drawBitmap(0,0,pokitto_icon); // draw the pokitto_icon graphic
+            }
+        }
+
+    return 0; // this is "good programming manners". Program informs it ended without errors
+}
+