Preliminary main mbed library for nexpaq development

Committer:
nexpaq
Date:
Fri Nov 04 20:54:50 2016 +0000
Revision:
1:d96dbedaebdb
Parent:
0:6c56fb4bc5f0
Removed extra directories for other platforms

Who changed what in which revision?

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