Lib for the LCD display on mbed lab Board

Committer:
dreschpe
Date:
Tue Oct 16 14:05:57 2012 +0000
Revision:
0:4bbc531be6e2
version 1.0

Who changed what in which revision?

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