Elaztek Developer Hub
Blamite Game Engine - Strings  00362.09.05.22.0236.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>
5 
6 #ifdef STRINGS_EXPORTS
7 #define STRINGS_API __declspec(dllexport)
8 #else
9 #define STRINGS_API __declspec(dllimport)
10 #endif
11 
12 typedef unsigned char byte;
13 
20 {
21 public:
22  byte r = 255;
23  byte g = 255;
24  byte b = 255;
25  byte a = 255;
26 
27  BlamColor();
28 
36  BlamColor(byte _r, byte _g, byte _b);
37 
46  BlamColor(byte _r, byte _g, byte _b, byte _a);
47 
53  std::string ToString();
54 
60  float GetRedAsFloat();
61 
67  float GetGreenAsFloat();
68 
74  float GetBlueAsFloat();
75 
81  float GetAlphaAsFloat();
82 
91  int GetColorAsInt();
92 
109  std::string ToString(std::string format);
110 
116  std::string ToStringForCSS();
117 
127  bool FromString(std::string string);
128 
138  BlamVector4 ToVector4();
139 
148  void FromVector4(BlamVector4 vector);
149 
160  bool Equals(BlamColor other_color);
161 };
byte
unsigned char byte
Definition: BlamColor.h:12
BlamVector4
Structure representing a 4D vector.
Definition: vector.h:162
STRINGS_API
#define STRINGS_API
Definition: BlamColor.h:9
vector.h
BlamColor
Class representing a color.
Definition: BlamColor.h:19