LED

Dependents:   LED_PWM_ansteuerung

Committer:
schoeni_91
Date:
Tue May 03 15:53:37 2016 +0000
Revision:
0:cbf905d4103b
f?r Rudi

Who changed what in which revision?

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