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