Logo
Color.h
1#pragma once
2
3namespace SharpKmyGfx{
4 public value class Color
5 {
6 public:
7 float r, g, b, a;
8
9 Color(float _r, float _g, float _b, float _a)
10 {
11 r = _r;
12 g = _g;
13 b = _b;
14 a = _a;
15 }
16
17 Color(Color c, float _a)
18 {
19 r = c.r;
20 g = c.g;
21 b = c.b;
22 a = a;
23 }
24
25 Color(byte _r, byte _g, byte _b)
26 {
27 r = _r / 255.f;
28 g = _g / 255.f;
29 b = _b / 255.f;
30 a = 1.f;
31 }
32
33 static property Color White{
34 Color get()
35 {
36 return Color(1, 1, 1, 1);
37 }
38 }
39
40 static property Color Gray{
41 Color get()
42 {
43 return Color(0.5f,0.5f,0.5f, 1);
44 }
45 }
46
47 static property Color Red{
48 Color get()
49 {
50 return Color(1, 0, 0, 1);
51 }
52 }
53 };
54}
Definition: Color.h:5
float r
Definition: Color.h:7
float b
Definition: Color.h:7
Color(byte _r, byte _g, byte _b)
Definition: Color.h:25
Color(Color c, float _a)
Definition: Color.h:17
float a
Definition: Color.h:7
Color(float _r, float _g, float _b, float _a)
Definition: Color.h:9
float g
Definition: Color.h:7
Definition: Billboard.cpp:4