ColorConverter.h 997 Bytes
Newer Older
daFischer's avatar
first  
daFischer committed
1 2
/* 
 * File:   ColorConverter.h
3
 * Author: Johannes Fischer
daFischer's avatar
first  
daFischer committed
4 5 6 7 8 9 10 11 12 13 14 15 16 17
 *
 * Created on June 4, 2014, 3:55 PM
 */

#ifndef COLORCONVERTER_H
#define	COLORCONVERTER_H

#include <stdlib.h>
#include <stdio.h>
#include <SDL/SDL.h>

class ColorConverter {
public:
    ColorConverter();
18
    static unsigned int getAnnotationColor(int colorValue, SDL_PixelFormat* format);
19 20
    static int decodeColor(unsigned char* bytes, int byteNum, SDL_PixelFormat* format);
    //int decodeColor8(int num);
daFischer's avatar
first  
daFischer committed
21 22 23
    
private:
    
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
    const static int White = 0;
    const static int DarkGray = 4;
    const static int Gray = 8;
    const static int LightGray = 12;
    const static int Black = 16;
    const static int Orange = 20;
    const static int Pink = 24;
    const static int Blue = 28;
    const static int Red = 32;
    const static int Green = 36;
    const static int Magenta = 40;
    const static int Yellow = 44;
    const static int Cyan = 48;
    
    static char colors[256][4];
daFischer's avatar
first  
daFischer committed
39 40 41 42
};

#endif	/* COLORCONVERTER_H */