cgma
|
00001 #ifndef CUBIT_COLOR_HPP 00002 #define CUBIT_COLOR_HPP 00003 00004 #include "CGMUtilConfigure.h" 00005 00008 struct CUBIT_UTIL_EXPORT CubitColor 00009 { 00010 CubitColor(); 00011 CubitColor(unsigned char r, unsigned char g, unsigned char b, unsigned char a=255); 00012 CubitColor(const CubitColor& other); 00013 00014 bool operator==(const CubitColor& other) const; 00015 00016 bool operator!=(const CubitColor& other) const; 00017 00019 static CubitColor rgb_from_double(double r, double g, double b, double a=1.0); 00020 00021 unsigned char red; 00022 unsigned char green; 00023 unsigned char blue; 00024 unsigned char alpha; 00025 }; 00026 00027 00028 const CubitColor CUBIT_DEFAULT_COLOR = CubitColor(); 00029 const CubitColor CUBIT_BLACK = CubitColor(0,0,0); 00030 const CubitColor CUBIT_GREY = CubitColor(127,127,127); 00031 const CubitColor CUBIT_ORANGE = CubitColor(255,165,0); 00032 const CubitColor CUBIT_RED = CubitColor(255,0,0); 00033 const CubitColor CUBIT_GREEN = CubitColor(0,255,0); 00034 const CubitColor CUBIT_YELLOW = CubitColor(255,255,0); 00035 const CubitColor CUBIT_MAGENTA = CubitColor(255,0,255); 00036 const CubitColor CUBIT_CYAN = CubitColor(0,255,255); 00037 const CubitColor CUBIT_BLUE = CubitColor(0,0,255); 00038 const CubitColor CUBIT_WHITE = CubitColor(255,255,255); 00039 const CubitColor CUBIT_BROWN = CubitColor(165,42,42); 00040 const CubitColor CUBIT_GOLD = CubitColor(255,215,0); 00041 const CubitColor CUBIT_LIGHTBLUE = CubitColor(173,216,230); 00042 const CubitColor CUBIT_LIGHTGREEN = CubitColor(0,204,0); 00043 const CubitColor CUBIT_SALMON = CubitColor(250,128,114); 00044 const CubitColor CUBIT_CORAL = CubitColor(255,127,80); 00045 const CubitColor CUBIT_PINK = CubitColor(255,192,203); 00046 00047 const int CUBIT_DEFAULT_COLOR_INDEX = -1; 00048 const int CUBIT_BLACK_INDEX = 0; 00049 const int CUBIT_GREY_INDEX = 1; 00050 const int CUBIT_ORANGE_INDEX = 2; 00051 const int CUBIT_RED_INDEX = 3; 00052 const int CUBIT_GREEN_INDEX = 4; 00053 const int CUBIT_YELLOW_INDEX = 5; 00054 const int CUBIT_MAGENTA_INDEX = 6; 00055 const int CUBIT_CYAN_INDEX = 7; 00056 const int CUBIT_BLUE_INDEX = 8; 00057 const int CUBIT_WHITE_INDEX = 9; 00058 const int CUBIT_BROWN_INDEX = 10; 00059 const int CUBIT_GOLD_INDEX = 11; 00060 const int CUBIT_LIGHTBLUE_INDEX = 12; 00061 const int CUBIT_LIGHTGREEN_INDEX = 13; 00062 const int CUBIT_SALMON_INDEX = 14; 00063 const int CUBIT_CORAL_INDEX = 15; 00064 const int CUBIT_PINK_INDEX = 16; 00065 00066 #endif 00067