Open
Graph Drawing
Framework

 v.2012.05
 

SimDrawColorizer.h
Go to the documentation of this file.
00001 /*
00002  * $Revision: 2299 $
00003  * 
00004  * last checkin:
00005  *   $Author: gutwenger $ 
00006  *   $Date: 2012-05-07 15:57:08 +0200 (Mon, 07 May 2012) $ 
00007  ***************************************************************/
00008  
00043 #ifndef OGDF_SIMDRAW_COLORIZER_H
00044 #define OGDF_SIMDRAW_COLORIZER_H
00045 
00046 #include <ogdf/simultaneous/SimDrawManipulatorModule.h>
00047 
00048 namespace ogdf 
00049 {
00050 
00052 
00066   class OGDF_EXPORT SimDrawColorizer : public SimDrawManipulatorModule 
00067   {
00068 
00069     public:
00071       enum colorScheme
00072       { 
00073         none, 
00074     bluYel, 
00075         redGre, 
00076         bluOra, 
00077         teaLil, 
00078         redBluYel, 
00079         greLilOra 
00080        };
00081 
00082     private:
00084       colorScheme m_colorScheme;
00085 
00086     public:
00088       SimDrawColorizer(SimDraw &SD) : SimDrawManipulatorModule(SD)
00089         { m_colorScheme = none; }
00090 
00092       const colorScheme &ColorScheme() const { return m_colorScheme; }
00093 
00095       colorScheme &ColorScheme() { return m_colorScheme; }
00096 
00098       void addColorNodeVersion();
00099 
00101       void addColor();
00102 
00103     public:
00105 
00123       class SimDrawColorScheme 
00124       {
00125         private:
00127           colorScheme m_intScheme;
00128 
00130 
00133           int *red;
00134 
00136 
00139           int *green;
00140 
00142 
00145           int *blue;  
00146 
00147         public:
00149           SimDrawColorScheme (enum colorScheme colorScm, int numberOfGraphs);
00150 
00152       ~SimDrawColorScheme();
00153  
00155           String getColor(int subGraphBits, int numberOfGraphs);
00156 
00158           void assignColScm(int numberOfGraphs);
00159       }; // SimDrawColorScheme
00160 
00161   }; // SimDrawColorizer
00162  
00163 
00164 
00165 }
00166 
00167 #endif