Graphical demo for the LPC4088 Experiment Base Board with one of the Display Expansion Kits. This program displays how to use the emWin library from Segger.
Dependencies: EALib ewgui mbed
This program requires the emWin library. Instructions and more information.
Graphics.h@0:7f5765fcd048, 2015-07-14 (annotated)
- Committer:
- embeddedartists
- Date:
- Tue Jul 14 11:34:15 2015 +0000
- Revision:
- 0:7f5765fcd048
First version
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
embeddedartists | 0:7f5765fcd048 | 1 | |
embeddedartists | 0:7f5765fcd048 | 2 | #ifndef GRAPHICS_H |
embeddedartists | 0:7f5765fcd048 | 3 | #define GRAPHICS_H |
embeddedartists | 0:7f5765fcd048 | 4 | |
embeddedartists | 0:7f5765fcd048 | 5 | class Graphics { |
embeddedartists | 0:7f5765fcd048 | 6 | public: |
embeddedartists | 0:7f5765fcd048 | 7 | |
embeddedartists | 0:7f5765fcd048 | 8 | Graphics(uint16_t *pFrmBuf, uint16_t dispWidth, uint16_t dispHeight); |
embeddedartists | 0:7f5765fcd048 | 9 | |
embeddedartists | 0:7f5765fcd048 | 10 | void setFrameBuffer( uint16_t *pFrmBuf ); |
embeddedartists | 0:7f5765fcd048 | 11 | void put_line(int32_t x1, int32_t y1, int32_t x2, int32_t y2, int16_t color); |
embeddedartists | 0:7f5765fcd048 | 12 | void put_circle( int32_t cx, int32_t cy, int16_t color, int32_t radius, int32_t Filled ); |
embeddedartists | 0:7f5765fcd048 | 13 | void put_dot( int32_t cx, int32_t cy, int16_t color ); |
embeddedartists | 0:7f5765fcd048 | 14 | |
embeddedartists | 0:7f5765fcd048 | 15 | protected: |
embeddedartists | 0:7f5765fcd048 | 16 | uint16_t windowX; |
embeddedartists | 0:7f5765fcd048 | 17 | uint16_t windowY; |
embeddedartists | 0:7f5765fcd048 | 18 | uint16_t *pFrmBuf; |
embeddedartists | 0:7f5765fcd048 | 19 | |
embeddedartists | 0:7f5765fcd048 | 20 | int32_t abs(int32_t v1) const; |
embeddedartists | 0:7f5765fcd048 | 21 | |
embeddedartists | 0:7f5765fcd048 | 22 | virtual void plot4points( int32_t cx, int32_t cy, int32_t x, int32_t y, int16_t color, int32_t Filled ); |
embeddedartists | 0:7f5765fcd048 | 23 | void plot8points( int32_t cx, int32_t cy, int32_t x, int32_t y, int16_t color, int32_t Filled ); |
embeddedartists | 0:7f5765fcd048 | 24 | |
embeddedartists | 0:7f5765fcd048 | 25 | }; |
embeddedartists | 0:7f5765fcd048 | 26 | |
embeddedartists | 0:7f5765fcd048 | 27 | #endif |
embeddedartists | 0:7f5765fcd048 | 28 | |
embeddedartists | 0:7f5765fcd048 | 29 | |
embeddedartists | 0:7f5765fcd048 | 30 | |
embeddedartists | 0:7f5765fcd048 | 31 |