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:
parent
b75ee4aacb
commit
7e5b81fe48
31 changed files with 49 additions and 41 deletions
31
SharedGraphics/Color.h
Normal file
31
SharedGraphics/Color.h
Normal 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 };
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue