Dualie
Loading...
Searching...
No Matches
include
Dualie
Graphics
Color.hpp
1
2
//
3
// Created by caleb on 6/16/24.
4
//
5
6
#ifndef DUALIE_COLOR_HPP
7
#define DUALIE_COLOR_HPP
8
9
#include <citro2d.h>
10
#include <cstdint>
11
12
namespace
dl {
13
14
typedef
u32 uint32_t;
15
19
class
Color
{
20
21
u32 m_color;
22
23
public
:
24
Color
();
25
Color
(std::uint8_t red, std::uint8_t green, std::uint8_t blue, std::uint8_t alpha = 255);
26
explicit
Color
(std::uint32_t color);
27
33
const
u32 &
getColorValue
()
const
;
34
35
36
//Important constants
37
static
Color
Black
;
38
static
Color
White
;
39
static
Color
Red
;
40
static
Color
Green
;
41
static
Color
Blue
;
42
static
Color
Yellow
;
43
static
Color
Magenta
;
44
static
Color
Cyan
;
45
static
Color
Transparent
;
46
47
};
48
49
50
}
51
52
53
#endif
//DUALIE_COLOR_HPP
dl::Color
A class used to describe a RGBA color.
Definition
Color.hpp:19
dl::Color::getColorValue
const u32 & getColorValue() const
Color values are stored as a 32 bit integer in the format ABGR, with A being shifted 24 bits,...
Definition
Color.cpp:21
dl::Color::Black
static Color Black
Black predefined color.
Definition
Color.hpp:37
dl::Color::Magenta
static Color Magenta
Magenta predefined color.
Definition
Color.hpp:43
dl::Color::White
static Color White
White predefined color.
Definition
Color.hpp:38
dl::Color::Red
static Color Red
Red predefined color.
Definition
Color.hpp:39
dl::Color::Transparent
static Color Transparent
Transparent (black) predefined color.
Definition
Color.hpp:45
dl::Color::Cyan
static Color Cyan
Cyan predefined color.
Definition
Color.hpp:44
dl::Color::Blue
static Color Blue
Blue predefined color.
Definition
Color.hpp:41
dl::Color::Green
static Color Green
Green predefined color.
Definition
Color.hpp:40
dl::Color::Yellow
static Color Yellow
Yellow predefined color.
Definition
Color.hpp:42
Generated by
1.12.0