Graphical demo for the LPC4088 Experiment Base Board with one of the Display Expansion Kits. This program decodes decodes and shows two png images.
PictureDemo.h
00001 00002 #ifndef PICTUREDEMO_H 00003 #define PICTUREDEMO_H 00004 00005 #include "EaLcdBoardGPIO.h" 00006 00007 class PictureDemo { 00008 public: 00009 00010 00011 /** Set the address of the frame buffer to use. 00012 * 00013 * It is the content of the frame buffer that is shown on the 00014 * display. All the drawing on the frame buffer can be done 00015 * 'offline' and whenever it should be shown this function 00016 * can be called with the address of the offline frame buffer. 00017 * 00018 * @param pFrameBuf Pointer to the frame buffer, which must be 00019 * 3 times as big as the frame size (for tripple 00020 * buffering). 00021 * dispWidth The width of the display (in pixels). 00022 * dispHeight The height of the display (in pixels). 00023 * loops Number of loops in the demo code. 00024 * delayMs Delay in milliseconds between schreen updates. 00025 * 00026 * @returns 00027 * none 00028 */ 00029 PictureDemo(uint8_t *pFrameBuf, uint16_t dispWidth, uint16_t dispHeight); 00030 00031 void run(EaLcdBoardGPIO& lcdBoard, int image, uint32_t delayMs); 00032 00033 private: 00034 int32_t windowX; 00035 int32_t windowY; 00036 uint16_t *pFrmBuf; 00037 uint16_t *pFrmBuf1; 00038 uint16_t *pFrmBuf2; 00039 uint16_t *pFrmBuf3; 00040 00041 void drawCentered(const unsigned char* pData, int size, uint32_t delayMs); 00042 }; 00043 00044 #endif /* PICTUREDEMO_H */ 00045
Generated on Fri Jul 15 2022 02:02:38 by 1.7.2