Sample GUI for LPC4088. Base code to begin dev

Dependencies:   DMBasicGUI DMSupport

Fork of lpc4088_displaymodule_shipped_demo by Embedded Artists

Revision:
4:a7cbb22e4348
Parent:
0:b94e330c98ac
--- a/AppImageViewer.cpp	Mon Mar 23 13:49:19 2015 +0000
+++ b/AppImageViewer.cpp	Tue Apr 28 12:21:14 2015 +0000
@@ -193,6 +193,10 @@
         }
         _win->fb = fb;
         Image::ImageData_t* data = (Image::ImageData_t*)evt.value.p;
+        if ((data->width < _disp->width()) || (data->height < _disp->height())) {
+          // Clear background as the image is not full screen
+          memset(fb, 0, _disp->fbSize());
+        }
         swim_put_image_xy(_win, (COLOR_T*)data->pixels, data->width, data->height, (_disp->width()-data->width)/2, (_disp->height()-data->height)/2);
         free(data->pointerToFree);
         _mailbox.free(data);
@@ -264,4 +268,3 @@
 {
     _resOk = res;
 }
-