Library for Modtronix im4OLED board with 128x64 OLED and 4 buttons. For details, see product page http://modtronix.com/im4oled.html. Is a clone of Adafruit_GFX library, with some additional code added.
Fork of Adafruit_GFX by
Diff: mx_gfx.cpp
- Revision:
- 23:44309099c532
- Parent:
- 22:f63aeb3769b5
- Child:
- 26:ef08580c35df
--- a/mx_gfx.cpp Tue Oct 20 17:18:02 2015 +1100 +++ b/mx_gfx.cpp Wed Oct 21 14:49:56 2015 +1100 @@ -22,7 +22,7 @@ #include "mx_gfx.h" #include "mx_gfx_font.h" -#if defined(GFX_ENABLE_ABSTRACTS) +#if (GFX_ENABLE_ABSTRACTS==1) // draw a circle outline void MxGfx::drawCircle(int16_t x0, int16_t y0, int16_t r, uint16_t color) { @@ -148,7 +148,7 @@ } #endif -#if defined(GFX_ENABLE_ABSTRACTS) || defined(GFX_SIZEABLE_TEXT) +#if defined(GFX_ENABLE_ABSTRACTS) || (GFX_SIZEABLE_TEXT==1) // bresenham's algorithm - thx wikpedia void MxGfx::drawLine(int16_t x0, int16_t y0, int16_t x1, int16_t y1, uint16_t color) { @@ -201,7 +201,7 @@ } /** Draw and fill a rectangle. The rectangle starts at given point, and extends DOWN(h) and RIGHTH(w) - * @note GFX_ENABLE_ABSTRACTS or GFX_SIZEABLE_TEXT must be defined in Adafruit_GFX_config.h + * @note GFX_ENABLE_ABSTRACTS or GFX_SIZEABLE_TEXT must be defined in im4oled_config.h * * @param x X coordinate, a value from 0 - (width-1) * @param y Y coordinate, a value from 0 - (height-1) @@ -217,7 +217,7 @@ } #endif -#if defined(GFX_ENABLE_ABSTRACTS) +#if (GFX_ENABLE_ABSTRACTS==1) // draw a rectangle void MxGfx::drawRect(int16_t x, int16_t y, int16_t w, int16_t h, uint16_t color) { @@ -421,7 +421,7 @@ { if (line & 0x1) { -#if defined(GFX_ENABLE_ABSTRACTS) || defined(GFX_SIZEABLE_TEXT) +#if (GFX_ENABLE_ABSTRACTS==1) || (GFX_SIZEABLE_TEXT==1) if (size == 1) // default size drawPixel(x+i, y+j, color); else // big size @@ -432,7 +432,7 @@ } else if (bg != color) { -#if defined(GFX_ENABLE_ABSTRACTS) || defined(GFX_SIZEABLE_TEXT) +#if (GFX_ENABLE_ABSTRACTS==1) || (GFX_SIZEABLE_TEXT==1) if (size == 1) // default size drawPixel(x+i, y+j, bg); else // big size