summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Libraries/LibGfx/Color.cpp5
-rw-r--r--Libraries/LibGfx/Color.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/Libraries/LibGfx/Color.cpp b/Libraries/LibGfx/Color.cpp
index 59f596ce21..0b4f5f0c8b 100644
--- a/Libraries/LibGfx/Color.cpp
+++ b/Libraries/LibGfx/Color.cpp
@@ -40,6 +40,11 @@ namespace Gfx {
Color::Color(NamedColor named)
{
+ if (named == Transparent) {
+ m_value = 0;
+ return;
+ }
+
struct {
u8 r;
u8 g;
diff --git a/Libraries/LibGfx/Color.h b/Libraries/LibGfx/Color.h
index 1af7ecfbbd..d58d546584 100644
--- a/Libraries/LibGfx/Color.h
+++ b/Libraries/LibGfx/Color.h
@@ -49,6 +49,7 @@ struct HSV {
class Color {
public:
enum NamedColor {
+ Transparent,
Black,
White,
Red,