mirror of
https://github.com/RGBCube/serenity
synced 2025-07-13 12:37:34 +00:00
LibGfx: Add Color::Transparent as a named color
This commit is contained in:
parent
2650005af8
commit
3bba163574
2 changed files with 6 additions and 0 deletions
|
@ -40,6 +40,11 @@ namespace Gfx {
|
||||||
|
|
||||||
Color::Color(NamedColor named)
|
Color::Color(NamedColor named)
|
||||||
{
|
{
|
||||||
|
if (named == Transparent) {
|
||||||
|
m_value = 0;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
u8 r;
|
u8 r;
|
||||||
u8 g;
|
u8 g;
|
||||||
|
|
|
@ -49,6 +49,7 @@ struct HSV {
|
||||||
class Color {
|
class Color {
|
||||||
public:
|
public:
|
||||||
enum NamedColor {
|
enum NamedColor {
|
||||||
|
Transparent,
|
||||||
Black,
|
Black,
|
||||||
White,
|
White,
|
||||||
Red,
|
Red,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue