WXP C++ Library Version 6.74.9
Loading...
Searching...
No Matches
ColorFill.h
1#ifndef _WINC_COLORFILL
2#define _WINC_COLORFILL
3
4#include <WXP/ColorMap.h>
5#include <WXP/PlotAttr.h>
6
7namespace WXP {
8 class ColorFill {
9 PlotAttr *attr;
10 float *value;
11 char label[20];
12
13 float base;
14 float intrvl;
15 int num;
16 int max;
17
18 int initClass();
19
20 public:
21 ColorFill( ColorMap &color, const char *str );
22 ColorFill( const ColorFill &fill );
23 ColorFill( );
24 ~ColorFill();
25 ColorFill operator=( const ColorFill &fill );
26 int init();
27 int set( const ColorFill &fill );
28 int set( const char *str );
29 int set( ColorMap &color, const char *str );
31 inline bool isSet(){ return num > 0 ? true : false; };
32 int setFill( ColorMap &color, const char *str );
33 int readFile( const char *file );
34 int readFile( ColorMap &color, const char *file );
35 int validateValues();
36 int decode( const char *str );
37 int decode( ColorMap &color, const char *str );
38 int setValues( float *vals, int num );
39 bool areValuesSet();
40 int getNum();
41 float getBaseVal();
42 float getValue( int ind );
43 int setBase( float rbase );
45 inline float getBase(){ return base; };
46 int setInterval( float rintrvl );
48 inline float getInterval(){ return intrvl; };
49 int getInd( float rvalue );
50 PlotAttr get( float rvalue );
51 PlotAttr get( int ind );
52 const char *getColorName( int ind );
53 int getColor( int ind );
54 int getColor( float rvalue );
56 bool validLabel( int ind );
57 const char *getLabel( int ind );
58 inline const char *getLabel(){ return label; };
59 int print();
60
61 };
62}
63
64#endif
This class sets up color fill parameters.
Definition ColorFill.h:8
bool validLabel(int ind)
Definition ColorFill.cc:484
int setFill(ColorMap &color, const char *str)
Definition ColorFill.cc:178
float getInterval()
Definition ColorFill.h:48
bool isSet()
Definition ColorFill.h:31
ColorFill operator=(const ColorFill &fill)
Definition ColorFill.cc:86
float getBase()
Definition ColorFill.h:45
int init()
Definition ColorFill.cc:37
This class defines a specific color map. This is a mapping between color indices, color names and RGB...
Definition ColorMap.h:8
This class stores plot attributes.
Definition PlotAttr.h:8
All WXP classes fall under the WXP namespace.
Definition Angle.h:4