Test for STM32F4
Fork of RGB_OLED_SSD1331 by
Diff: include/SGL.h
- Revision:
- 15:c49040bf0e1d
- Parent:
- 13:8dd215952d76
- Child:
- 17:1bcdc92af126
--- a/include/SGL.h Tue Dec 22 21:44:31 2015 +0000 +++ b/include/SGL.h Thu Dec 08 21:38:39 2016 +0000 @@ -32,12 +32,14 @@ #define _SGL_H_ #include <stdint.h> +#include "Rect.h" #define MIN(a,b) (((a)<(b))?(a):(b)) #define MAX(a,b) (((a)>(b))?(a):(b)) typedef const unsigned char** FontType; + template <class T> class SGL { @@ -56,7 +58,8 @@ // The zoom factor works at the moment only with integer values. Float values will create bad fonts virtual void drawChar(uint8_t ascii, T x, T y, uint16_t color, float zoom=1); - virtual void drawString(const char *string, T x, T y, uint16_t color, float zoom=1, uint8_t fontSpace=6); +/* virtual void drawString(const char *string, T x, T y, uint16_t color, float zoom=1, uint8_t fontSpace=6);*/ + virtual Rect<T> drawString(const char *string, T x, T y, uint16_t color, float zoom=1, uint8_t fontSpace=6); virtual void drawBitMap(T x, T y, const uint8_t *bitmap, T width, T height, uint16_t color); virtual void fillScreen(uint16_t color);