00001 // -*- mode:c++ -*- 00002 00016 class Color 00017 { 00018 %TypeHeaderCode 00019 #include "graphics/Color.h" 00020 %End 00021 00022 public: 00023 00024 static Color red; 00025 static Color green; 00026 static Color blue; 00027 static Color cyan; 00028 static Color magenta; 00029 static Color yellow; 00030 static Color orange; 00031 static Color black; 00032 static Color darkgray; 00033 static Color lightgray; 00034 static Color white; 00035 00036 // /** The following constructor takes red, green, and blue components as 00037 // arguments. The range of the values is 0 to 255. If the default 00038 // values are taken, then the color will be black.*/ 00039 // Color ( int = 0, int = 0, int = 0 ); 00040 00044 /* explicit */ 00045 Color ( int = 0, int = 0, int = 0 ); 00046 00048 void setColor ( int = 0, int = 0, int = 0 ); 00049 00050 int getRed () const; 00051 00052 int getGreen () const; 00053 00054 int getBlue () const; 00055 00056 // friend std::ostream & operator << ( std::ostream &, const Color & ); 00057 00058 }; 00059 00060 // %ModuleCode 00061 // static Color blue = Color ( 0, 0, 255 ); 00062 // static Color red = Color ( 255, 0, 0 ); 00063 // static Color yellow = Color ( 255, 255, 0 ); 00064 // %End 00065