KSM edits to RA8875

Dependents:   Liz_Test_Code

Committer:
WiredHome
Date:
Sun Jan 12 17:40:32 2014 +0000
Revision:
19:3f82c1161fd2
Parent:
11:9bb71766cafc
Child:
29:422616aa04bd
Initial commit - mostly working (not Triangles, Externals Fonts). Not ready for other users.

Who changed what in which revision?

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