TINF_Stopwatch

Committer:
Wizo
Date:
Thu Nov 15 18:09:41 2018 +0000
Revision:
0:ab787614c0d8
TINF_Stopwatch

Who changed what in which revision?

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