Test program for FF1705.
Dependencies: libxDot-dev-mbed5-deprecated ISL29011
Libraries/C12832/GraphicsDisplay.h@2:9b44950b84af, 2017-11-09 (annotated)
- Committer:
- jernej_vrscaj
- Date:
- Thu Nov 09 07:18:24 2017 +0000
- Revision:
- 2:9b44950b84af
- Parent:
- 0:d96e7e513c16
Small correction in printf message.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
jernej_vrscaj | 0:d96e7e513c16 | 1 | /* mbed GraphicsDisplay Display Library Base Class |
jernej_vrscaj | 0:d96e7e513c16 | 2 | * Copyright (c) 2007-2009 sford |
jernej_vrscaj | 0:d96e7e513c16 | 3 | * Released under the MIT License: http://mbed.org/license/mit |
jernej_vrscaj | 0:d96e7e513c16 | 4 | * |
jernej_vrscaj | 0:d96e7e513c16 | 5 | * A library for providing a common base class for Graphics displays |
jernej_vrscaj | 0:d96e7e513c16 | 6 | * To port a new display, derive from this class and implement |
jernej_vrscaj | 0:d96e7e513c16 | 7 | * the constructor (setup the display), pixel (put a pixel |
jernej_vrscaj | 0:d96e7e513c16 | 8 | * at a location), width and height functions. Everything else |
jernej_vrscaj | 0:d96e7e513c16 | 9 | * (locate, printf, putc, cls, window, putp, fill, blit, blitbit) |
jernej_vrscaj | 0:d96e7e513c16 | 10 | * will come for free. You can also provide a specialised implementation |
jernej_vrscaj | 0:d96e7e513c16 | 11 | * of window and putp to speed up the results |
jernej_vrscaj | 0:d96e7e513c16 | 12 | */ |
jernej_vrscaj | 0:d96e7e513c16 | 13 | |
jernej_vrscaj | 0:d96e7e513c16 | 14 | #ifndef MBED_GRAPHICSDISPLAY_H |
jernej_vrscaj | 0:d96e7e513c16 | 15 | #define MBED_GRAPHICSDISPLAY_H |
jernej_vrscaj | 0:d96e7e513c16 | 16 | |
jernej_vrscaj | 0:d96e7e513c16 | 17 | #include "TextDisplay.h" |
jernej_vrscaj | 0:d96e7e513c16 | 18 | |
jernej_vrscaj | 0:d96e7e513c16 | 19 | class GraphicsDisplay : public TextDisplay { |
jernej_vrscaj | 0:d96e7e513c16 | 20 | |
jernej_vrscaj | 0:d96e7e513c16 | 21 | public: |
jernej_vrscaj | 0:d96e7e513c16 | 22 | |
jernej_vrscaj | 0:d96e7e513c16 | 23 | GraphicsDisplay(const char* name); |
jernej_vrscaj | 0:d96e7e513c16 | 24 | |
jernej_vrscaj | 0:d96e7e513c16 | 25 | virtual void pixel(int x, int y, int colour) = 0; |
jernej_vrscaj | 0:d96e7e513c16 | 26 | virtual int width() = 0; |
jernej_vrscaj | 0:d96e7e513c16 | 27 | virtual int height() = 0; |
jernej_vrscaj | 0:d96e7e513c16 | 28 | |
jernej_vrscaj | 0:d96e7e513c16 | 29 | virtual void window(int x, int y, int w, int h); |
jernej_vrscaj | 0:d96e7e513c16 | 30 | virtual void putp(int colour); |
jernej_vrscaj | 0:d96e7e513c16 | 31 | |
jernej_vrscaj | 0:d96e7e513c16 | 32 | virtual void cls(); |
jernej_vrscaj | 0:d96e7e513c16 | 33 | virtual void fill(int x, int y, int w, int h, int colour); |
jernej_vrscaj | 0:d96e7e513c16 | 34 | virtual void blit(int x, int y, int w, int h, const int *colour); |
jernej_vrscaj | 0:d96e7e513c16 | 35 | virtual void blitbit(int x, int y, int w, int h, const char* colour); |
jernej_vrscaj | 0:d96e7e513c16 | 36 | |
jernej_vrscaj | 0:d96e7e513c16 | 37 | virtual void character(int column, int row, int value); |
jernej_vrscaj | 0:d96e7e513c16 | 38 | virtual int columns(); |
jernej_vrscaj | 0:d96e7e513c16 | 39 | virtual int rows(); |
jernej_vrscaj | 0:d96e7e513c16 | 40 | |
jernej_vrscaj | 0:d96e7e513c16 | 41 | protected: |
jernej_vrscaj | 0:d96e7e513c16 | 42 | |
jernej_vrscaj | 0:d96e7e513c16 | 43 | // pixel location |
jernej_vrscaj | 0:d96e7e513c16 | 44 | short _x; |
jernej_vrscaj | 0:d96e7e513c16 | 45 | short _y; |
jernej_vrscaj | 0:d96e7e513c16 | 46 | |
jernej_vrscaj | 0:d96e7e513c16 | 47 | // window location |
jernej_vrscaj | 0:d96e7e513c16 | 48 | short _x1; |
jernej_vrscaj | 0:d96e7e513c16 | 49 | short _x2; |
jernej_vrscaj | 0:d96e7e513c16 | 50 | short _y1; |
jernej_vrscaj | 0:d96e7e513c16 | 51 | short _y2; |
jernej_vrscaj | 0:d96e7e513c16 | 52 | |
jernej_vrscaj | 0:d96e7e513c16 | 53 | }; |
jernej_vrscaj | 0:d96e7e513c16 | 54 | |
jernej_vrscaj | 0:d96e7e513c16 | 55 | #endif |
jernej_vrscaj | 0:d96e7e513c16 | 56 |