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