summaryrefslogtreecommitdiff
path: root/glcdgraphics
diff options
context:
space:
mode:
Diffstat (limited to 'glcdgraphics')
-rw-r--r--glcdgraphics/bitmap.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/glcdgraphics/bitmap.h b/glcdgraphics/bitmap.h
index d87745d..7f17e51 100644
--- a/glcdgraphics/bitmap.h
+++ b/glcdgraphics/bitmap.h
@@ -45,9 +45,10 @@ enum eColor
class cColor
{
-public:
- uint32_t color;
+protected:
+ uint32_t color;
+public:
cColor(uint32_t col) { color = col; }
cColor(const cColor & col) { color = col.color; }
@@ -62,13 +63,13 @@ public:
static const uint32_t Transparent = 0x00FFFFFF;
static const uint32_t ERRCOL = 0x00000000;
- operator uint32_t(void) { return color; }
-
uint32_t GetColor (void) { return color; }
void SetColor (uint32_t col) { color = col; }
cColor Invert (void);
+ operator uint32_t(void) { return GetColor(); }
+
static cColor ParseColor (std::string col);
static uint32_t AlignAlpha (uint32_t col) { return (col & 0xFF000000) ? col : (col | 0xFF000000); }
};