1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 04:17:35 +00:00

Make a SharedGraphics directory for classes shared between Kernel and LibGUI.

This commit is contained in:
Andreas Kling 2019-01-19 23:22:46 +01:00
parent b75ee4aacb
commit 7e5b81fe48
31 changed files with 49 additions and 41 deletions

31
SharedGraphics/Color.h Normal file
View file

@ -0,0 +1,31 @@
#pragma once
#include <AK/Types.h>
typedef dword RGBA32;
class Color {
public:
enum NamedColor {
Black,
White,
Red,
Green,
Blue,
Yellow,
Magenta,
DarkGray,
MidGray,
LightGray,
};
Color() { }
Color(NamedColor);
Color(byte r, byte g, byte b) : m_value((r << 16) | (g << 8) | b) { }
Color(RGBA32 rgba) : m_value(rgba) { }
RGBA32 value() const { return m_value; }
private:
RGBA32 m_value { 0 };
};