WXP C++ Library Version 6.74.6
Loading...
Searching...
No Matches
ContPlot.h
1#ifndef _WINC_CONTPLOT
2#define _WINC_CONTPLOT
3
4#include <WXP/ColorFill.h>
5#include <WXP/Domain.h>
6#include <WXP/Grid.h>
7#include <WXP/GridBox.h>
8#include <WXP/GridPoint.h>
9#include <WXP/Plot.h>
10#include <WXP/PlotAttr.h>
11#include <WXP/Point.h>
12#include <WXP/String.h>
13
14namespace WXP {
15 class ContPlot {
16 int type;
17 String color_table;
18 String color_fill;
19 String color_line;
20 String color_label;
21 float min, max;
22 float dpy_min, dpy_max;
23 float base;
24 float intrvl;
25 float level, plevel;
26 int num_cont;
27 float conlo, conhi;
28 ColorFill fill;
29 GridBox box, pbox;
30 int skipx, skipy, skipval;
31 int extrad;
32 int dash;
33 int fill_pat;
34 float line_width;
35 float scale;
36 char tform[10];
37 int bar;
38
39 public:
40 ContPlot();
41 ContPlot( const char *params );
42 int init();
43 int setParam( const char *str );
44 int setType( int rtype );
45 int setType( const char *str );
47 inline int getType(){ return type; };
49 inline bool isTypeFill(){ return ( type == FILL || type == BOTH )? true: false; };
50 int setInterval( float val );
52 inline float getInterval(){ return intrvl; };
53 int setBase( float val );
54 int setBase( const char *str );
56 inline float getBase(){ return base; };
58 inline float getMax(){ return max; };
60 inline float getMin(){ return min; };
61 int setLabelParam( int skip, int rad );
62 int setLabelSpace( int x, int y );
63 int setFillStyle( int type );
64 int setLineWidth( float width );
65 int setTextFormat( const char *fm );
66 int setColorTable( const char *str );
67 int setColorFill( const char *str );
68 int setColorLine( const char *str );
69 int setColorLabel( const char *str );
70 int setScaleFactor( float sc );
71 int draw( Plot &plot, Grid &grid );
72 int drawLabels( Plot &plot, Grid &grid );
73 int drawFill( Plot &plot, Grid &grid );
74 int drawBoxFill( Plot &plot );
75 int drawLine( Plot &plot, Grid &grid );
76 int drawBoxLine( Plot &plot );
77 int drawValues( Plot &plot, Grid &grid );
78 int drawLineLabels( Plot &plot, Grid &grid );
79 int drawMaxMin( Plot &plot, Grid &grid );
80 float getLevel( int ind );
82 inline PlotAttr getColorFill( int ind ){ return fill.get( ind ); };
83#ifdef SPLINE
84 int setLoc( int ind, int x, int y, GridPoint &gpt );
85 int getLine( Grid &grid, Domain &domain, int ind,
86 int x, int y, float level, int &npts, Point *pts );
87 int drawSpline( Plot &plot, Grid &grid );
88#endif
89
91 enum ContType {
96 BOTH
97 };
98
99 static int decodeType( const char *str );
100 };
101}
102#endif
This class sets up color fill parameters.
Definition: ColorFill.h:8
This class contours a grid.
Definition: ContPlot.h:15
int setInterval(float val)
Definition: ContPlot.cc:287
int setType(int rtype)
Definition: ContPlot.cc:162
int setLabelParam(int skip, int rad)
Definition: ContPlot.cc:320
float getBase()
Definition: ContPlot.h:56
int drawMaxMin(Plot &plot, Grid &grid)
Definition: ContPlot.cc:2103
int setColorLine(const char *str)
Definition: ContPlot.cc:377
int drawValues(Plot &plot, Grid &grid)
Definition: ContPlot.cc:1892
float getMin()
Definition: ContPlot.h:60
ContType
Definition: ContPlot.h:91
@ BOTH
Definition: ContPlot.h:96
@ VALUE
Definition: ContPlot.h:93
@ FILL
Definition: ContPlot.h:95
@ LINE
Definition: ContPlot.h:94
@ NONE
Definition: ContPlot.h:92
int drawBoxFill(Plot &plot)
Definition: ContPlot.cc:660
float getMax()
Definition: ContPlot.h:58
int getType()
Definition: ContPlot.h:47
int setLineWidth(float width)
Definition: ContPlot.cc:350
ContPlot()
Definition: ContPlot.cc:38
int setColorTable(const char *str)
Definition: ContPlot.cc:359
int drawLabels(Plot &plot, Grid &grid)
Definition: ContPlot.cc:126
int setTextFormat(const char *fm)
Definition: ContPlot.cc:404
PlotAttr getColorFill(int ind)
Definition: ContPlot.h:82
int setLabelSpace(int x, int y)
Definition: ContPlot.cc:331
int setFillStyle(int type)
Definition: ContPlot.cc:341
int drawBoxLine(Plot &plot)
Definition: ContPlot.cc:1830
int setColorLabel(const char *str)
Definition: ContPlot.cc:386
int setBase(float val)
Definition: ContPlot.cc:296
int setColorFill(const char *str)
Definition: ContPlot.cc:368
int drawFill(Plot &plot, Grid &grid)
Definition: ContPlot.cc:431
int init()
Definition: ContPlot.cc:50
bool isTypeFill()
Definition: ContPlot.h:49
int setParam(const char *str)
Definition: ContPlot.cc:207
int setScaleFactor(float sc)
Definition: ContPlot.cc:395
static int decodeType(const char *str)
Definition: ContPlot.cc:2224
int draw(Plot &plot, Grid &grid)
Definition: ContPlot.cc:99
int drawLine(Plot &plot, Grid &grid)
Definition: ContPlot.cc:1653
float getLevel(int ind)
Definition: ContPlot.cc:415
float getInterval()
Definition: ContPlot.h:52
int drawLineLabels(Plot &plot, Grid &grid)
Definition: ContPlot.cc:2017
This class stores and manipulates domain data.
Definition: Domain.h:19
This class sets up a grid box for use with contouring.
Definition: GridBox.h:9
This class defines a grid.
Definition: Grid.h:19
This class stores plot attributes.
Definition: PlotAttr.h:8
This class defines mid-level graphics commands. Calls the Graph object for actual graphics output.
Definition: Plot.h:26
This is a variable length string class.
Definition: String.h:5
All WXP classes fall under the WXP namespace.
Definition: Angle.h:4
This struct defines basic gridpoint values.
Definition: GridPoint.h:5
This struct sets a 3D point (x, y, z)
Definition: Point.h:5