Elaztek Developer Hub
Blamite Game Engine - Strings  00307.01.26.21.0804.blamite
A library containing general purpose utilities and classes for use in multiple projects.
BlamColor.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <string>
4 
5 #ifdef STRINGS_EXPORTS
6 #define STRINGS_API __declspec(dllexport)
7 #else
8 #define STRINGS_API __declspec(dllimport)
9 #endif
10 
17 {
18 public:
19  unsigned char r = 255;
20  unsigned char g = 255;
21  unsigned char b = 255;
22  unsigned char a = 255;
23 
24  BlamColor();
25 
26  BlamColor(short _r, short _g, short _b);
27 
28  BlamColor(short _r, short _g, short _b, short _a);
29 
35  std::string ToString();
36 
42  float GetRedAsFloat();
43 
49  float GetGreenAsFloat();
50 
56  float GetBlueAsFloat();
57 
63  float GetAlphaAsFloat();
64 
73  int GetColorAsInt();
74 
91  std::string ToString(std::string format);
92 
98  std::string ToStringForCSS();
99 
109  bool FromString(std::string string);
110 };
STRINGS_API
#define STRINGS_API
Definition: BlamColor.h:8
BlamColor
Class representing a color.
Definition: BlamColor.h:16