summaryrefslogtreecommitdiff
path: root/glcdgraphics/bitmap.h
diff options
context:
space:
mode:
Diffstat (limited to 'glcdgraphics/bitmap.h')
-rw-r--r--glcdgraphics/bitmap.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/glcdgraphics/bitmap.h b/glcdgraphics/bitmap.h
index 7f17e51..0528441 100644
--- a/glcdgraphics/bitmap.h
+++ b/glcdgraphics/bitmap.h
@@ -71,7 +71,15 @@ public:
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); }
+ static uint32_t AlignAlpha (uint32_t col) {
+ switch (col) {
+ case Transparent:
+ case ERRCOL:
+ return col;
+ default:
+ return (col & 0xFF000000) ? col : (col | 0xFF000000);
+ }
+ }
};