WXP::Contour Class Reference
[Plotting objects]

This class contours a grid. More...

#include "../include/Contour.h"

List of all members.

Public Types

enum  {
  NONE, VALUE, LINE, FILL,
  BOTH
}

Public Member Functions

int init ()
int setParam (const char *str)
int setType (int rtype)
int setType (const char *str)
int getType ()
bool isTypeFill ()
int setInterval (float val)
float getInterval ()
int setBase (float val)
float getBase ()
float getMax ()
float getMin ()
int setLabelParam (int skip, int rad)
int setLabelSpace (int x, int y)
int setFillStyle (int type)
int setLineWidth (float width)
int setColorTable (const char *str)
int setColorFill (const char *str)
int setColorLine (const char *str)
int setColorLabel (const char *str)
int setScaleFactor (float sc)
int draw (Plot &plot, Grid &grid)
int drawLabels (Plot &plot, Grid &grid)
int drawFill (Plot &plot, Grid &grid)
int drawBoxFill (Plot &plot, Grid &grid)
int drawLine (Plot &plot, Grid &grid)
int drawBoxLine (Plot &plot, Grid &grid)
int drawValues (Plot &plot, Grid &grid)
int drawLineLabels (Plot &plot, Grid &grid)
int drawMaxMin (Plot &plot, Grid &grid)
int drawBar (Plot &plot, const char *locate)
float getLevel (int ind)
PlotAttr getColorFill (int ind)

Static Public Member Functions

static int decodeType (const char *str)

Detailed Description

This class contours a grid.

Author:
Dan Vietor

Member Function Documentation

int Contour::draw ( Plot plot,
Grid grid 
)

Contours the grid

Parameters:
plot Plot object
grid Grid to contour

Referenced by WXP::UpaXSectCont::draw().

int Contour::drawBar ( Plot plot,
const char *  locate 
)

Draws the color bar legend

Parameters:
plot Plot object
locate Location of bar
int Contour::init (  ) 
int Contour::setBase ( float  val  ) 

Sets the contour base value used in color fill and other parameters

Parameters:
val Base value

Referenced by WXP::UpaXSectCont::draw(), init(), and setParam().

int Contour::setColorFill ( const char *  str  ) 

Sets the color fill parameters

Parameters:
str Color fill string

References WXP::String::set().

Referenced by init(), WXP::GridCont::setColorFill(), and setParam().

int Contour::setColorLabel ( const char *  str  ) 

Sets the color for contour labels

Parameters:
str Color string

References WXP::String::set().

int Contour::setColorLine ( const char *  str  ) 

Sets the color for line contours

Parameters:
str Color string

References WXP::String::set().

Referenced by init(), and setParam().

int Contour::setColorTable ( const char *  str  ) 

Sets the color table parameters

Parameters:
str Color table parameter

References WXP::String::set().

Referenced by init(), WXP::GridCont::setColorTable(), and setParam().

int Contour::setFillStyle ( int  type  ) 

Sets the fill contour style

Parameters:
type Fill pattern type

Referenced by setParam().

int Contour::setInterval ( float  val  ) 

Sets the contour interval

Parameters:
val Contour interval

Referenced by WXP::UpaXSectCont::draw(), init(), and setParam().

int Contour::setLabelParam ( int  skip,
int  rad 
)

Sets the label parameters

Parameters:
skip Contour value skip factor
rad Search radius for max/min labels

Referenced by setParam().

int Contour::setLabelSpace ( int  x,
int  y 
)

Sets the spacing factors for contour line labels

Parameters:
x X skip factor
y Y skip factor

Referenced by setParam().

int Contour::setLineWidth ( float  width  ) 

Sets the line width

Parameters:
type Fill pattern type

Referenced by setParam().

int Contour::setParam ( const char *  str  ) 

Sets the contouring parameters

Parameters:
str Parameter string
ty=type - Contour type
pl=type - Contour type
in=intrvl - Contour interval
base=val - Contour base
cb=val - Contour base
fill=type - Contour fill type
ct=file - Color table file
coco=color - Line contour color
coln=color - Line contour color
cof=color - Fill contour colors
lab=s:r:x:y - Label parameters: skip, rad, x, y

References WXP::StrLib::copy(), WXP::Strings::equal(), WXP::Strings::getNum(), WXP::Strings::getString(), WXP::Strings::getStringAfter(), WXP::Strings::scanf(), setBase(), setColorFill(), setColorLine(), setColorTable(), setFillStyle(), setInterval(), setLabelParam(), setLabelSpace(), setLineWidth(), and setScaleFactor().

Referenced by WXP::UpaXSectCont::draw(), init(), and WXP::GridCont::setParam().

int Contour::setScaleFactor ( float  sc  ) 

Sets the scale factor

Parameters:
str Color string

Referenced by setParam().

int Contour::setType ( const char *  str  ) 

Sets the contour type

Parameters:
str Type of contours (cf, ln, dln, ndln, value, gvalue)

References WXP::StrLib::equal().


The documentation for this class was generated from the following files:

Generated on 8 Jan 2010 for WXP C++ Library by  doxygen 1.6.1