TINF_Testvorbereitung_5B

Dependencies:   mbed

Committer:
Wizo
Date:
Thu Nov 15 18:14:50 2018 +0000
Revision:
0:799a62df672a
TINF_Testvorbereitung_5B

Who changed what in which revision?

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