animated text

This commit is contained in:
Henrique Santiago
2011-12-26 09:53:16 -02:00
parent 37a6a38ca6
commit 5830a3dc3e
11 changed files with 177 additions and 6 deletions

View File

@@ -61,6 +61,16 @@ public:
bool operator==(const Color& other) const { return other.m_rgba == m_rgba; }
bool operator!=(const Color& other) const { return other.m_rgba != m_rgba; }
static Color from8bit(int color) {
if(color >= 216 || color <= 0)
return Color(0, 0, 0);
int r = int(color / 36) % 6 * 51;
int g = int(color / 6) % 6 * 51;
int b = color % 6 * 51;
return Color(r, g, b);
}
private:
union {
uint32 m_rgba;