.

Dependents:   projekat

Committer:
2018US_EminaTahirovi
Date:
Sun Jun 16 20:26:22 2019 +0000
Revision:
0:1b3481785d59
.

Who changed what in which revision?

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