00001 #ifndef _WINC_COLORFILL
00002 #define _WINC_COLORFILL
00003
00004 #include <WXP/ColorMap.h>
00005 #include <WXP/PlotAttr.h>
00006
00007 namespace WXP {
00008 class ColorFill {
00009 PlotAttr *attr;
00010 float *value;
00011 char label[20];
00012
00013 float base;
00014 float intrvl;
00015 int num;
00016 int max;
00017
00018 int initClass();
00019
00020 public:
00021 ColorFill( ColorMap &color, const char *str );
00022 ColorFill( ColorFill &fill );
00023 ColorFill( );
00024 ~ColorFill();
00025 int init();
00026 int set( ColorMap &color, const char *str );
00027 inline bool isSet(){ return num > 0 ? true : false; };
00028 int setFill( ColorMap &color, const char *str );
00029 int readFile( ColorMap &color, const char *file );
00030 int validateValues();
00031 int decode( ColorMap &color, const char *str );
00032 int setValues( float *vals, int num );
00033 bool areValuesSet();
00034 int getNum();
00035 float getBaseVal();
00036 float getValue( int ind );
00037 int setBase( float rbase );
00038 inline float getBase(){ return base; };
00039 int setInterval( float rintrvl );
00040 inline float getInterval(){ return intrvl; };
00041 PlotAttr get( float rvalue );
00042 PlotAttr get( int ind );
00043 const char *getColorName( int ind );
00044 int getColor( int ind );
00045 int getColor( float rvalue );
00046 inline const char *getLabel(){ return label; };
00047 int print();
00048 };
00049 }
00050
00051 #endif