ParaView
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes
pqChartPixelScale Class Reference

The pqChartPixelScale class maps chart values to pixel locations. More...

#include <pqChartPixelScale.h>

List of all members.

Public Types

enum  ValueScale { Linear, Logarithmic }

Public Member Functions

 pqChartPixelScale ()
 ~pqChartPixelScale ()
Value Parameters
bool setValueRange (const pqChartValue &min, const pqChartValue &max)
 Sets the value range.
void getValueRange (pqChartValue &range) const
 Gets the value range.
bool setMinValue (const pqChartValue &min)
 Sets the minimum value.
const pqChartValuegetMinValue () const
 Gets the minimum value.
bool setMaxValue (const pqChartValue &max)
 Sets the maximum value.
const pqChartValuegetMaxValue () const
 Gets the maximum value.
Pixel Parameters
bool setPixelRange (int min, int max)
 Sets the pixel range.
int getPixelRange () const
 Gets the pixel range.
bool setMinPixel (int min)
 Sets the minimum pixel location.
int getMinPixel () const
 Gets the minimum pixel location.
bool setMaxPixel (int max)
 Sets the maximum pixel location.
int getMaxPixel () const
 Gets the maximum pixel location.
Pixel to Value Mapping
int getPixel (const pqChartValue &value) const
 Maps a value to a pixel.
float getPixelF (const pqChartValue &value) const
 Maps a value to a pixel.
void getValue (int pixel, pqChartValue &value) const
 Maps a pixel to a value.
bool isValid () const
 Used to determine if the pixel/value mapping is valid.
bool isZeroInRange () const
 Used to determine if zero is in the value range.
void setScaleType (ValueScale scale)
 Sets the scale type.
ValueScale getScaleType () const
 Gets the scale type.
bool isLogScaleAvailable () const
 Gets wether or not logarithmic scale can be used.

Static Public Member Functions

static bool isLogScaleValid (const pqChartValue &min, const pqChartValue &max)

Static Public Attributes

static const double MinLogValue
 Stores the log scale minimum.

Detailed Description

The pqChartPixelScale class maps chart values to pixel locations.

Definition at line 49 of file pqChartPixelScale.h.


Member Enumeration Documentation

Enumerator:
Linear 

Use a linear scale.

Logarithmic 

Use a logarithmic scale.

Definition at line 52 of file pqChartPixelScale.h.


Constructor & Destructor Documentation

pqChartPixelScale::pqChartPixelScale ( )
pqChartPixelScale::~pqChartPixelScale ( )

Member Function Documentation

bool pqChartPixelScale::setValueRange ( const pqChartValue min,
const pqChartValue max 
)

Sets the value range.

Parameters:
minThe minimum value.
maxThe maximum value.
Returns:
True if the pixel-value scale changed.
void pqChartPixelScale::getValueRange ( pqChartValue range) const

Gets the value range.

Parameters:
rangeUsed to return the difference between the minimum and maximum values.
bool pqChartPixelScale::setMinValue ( const pqChartValue min)

Sets the minimum value.

Parameters:
minThe minimum value.
Returns:
True if the pixel-value scale changed.
const pqChartValue& pqChartPixelScale::getMinValue ( ) const

Gets the minimum value.

Returns:
The minimum value.
bool pqChartPixelScale::setMaxValue ( const pqChartValue max)

Sets the maximum value.

Parameters:
maxThe maximum value.
Returns:
True if the pixel-value scale changed.
const pqChartValue& pqChartPixelScale::getMaxValue ( ) const

Gets the maximum value.

Returns:
The maximum value.
bool pqChartPixelScale::setPixelRange ( int  min,
int  max 
)

Sets the pixel range.

Parameters:
minThe minimum pixel location.
maxThe maximum pixel location.
Returns:
True if the pixel-value scale changed.
int pqChartPixelScale::getPixelRange ( ) const

Gets the pixel range.

The pixel range is always returned as a positive number.

Returns:
The difference between the minimum and maximum pixels.
bool pqChartPixelScale::setMinPixel ( int  min)

Sets the minimum pixel location.

Parameters:
minThe minimum pixel location.
Returns:
True if the pixel-value scale changed.
int pqChartPixelScale::getMinPixel ( ) const

Gets the minimum pixel location.

Returns:
The minimum pixel location.
bool pqChartPixelScale::setMaxPixel ( int  max)

Sets the maximum pixel location.

Parameters:
maxThe maximum pixel location.
Returns:
True if the pixel-value scale changed.
int pqChartPixelScale::getMaxPixel ( ) const

Gets the maximum pixel location.

Returns:
The maximum pixel location.
int pqChartPixelScale::getPixel ( const pqChartValue value) const

Maps a value to a pixel.

Parameters:
valueThe data value.
Returns:
The pixel location for the given value.
See also:
pqChartPixelScale::isValid(), pqChartPixelScale::getValue(int)
float pqChartPixelScale::getPixelF ( const pqChartValue value) const

Maps a value to a pixel.

Parameters:
valueThe data value.
Returns:
The pixel location for the given value.
See also:
pqChartPixelScale::isValid(), pqChartPixelScale::getValue(int)
void pqChartPixelScale::getValue ( int  pixel,
pqChartValue value 
) const

Maps a pixel to a value.

Parameters:
pixelThe pixel location.
valueUsed to return the value equivalent to the pixel location.
See also:
pqChartPixelScale::isValid(), pqChartPixelScale::getPixel(const pqChartValue &)
bool pqChartPixelScale::isValid ( ) const

Used to determine if the pixel/value mapping is valid.

Returns:
True if the pixel/value mapping is valid.
bool pqChartPixelScale::isZeroInRange ( ) const

Used to determine if zero is in the value range.

Returns:
True if zero is in the value range.
void pqChartPixelScale::setScaleType ( ValueScale  scale)

Sets the scale type.

Parameters:
scaleThe new scale type.
ValueScale pqChartPixelScale::getScaleType ( ) const

Gets the scale type.

Returns:
The current scale type.
bool pqChartPixelScale::isLogScaleAvailable ( ) const

Gets wether or not logarithmic scale can be used.

Returns:
True if logarithmic scale can be used.
static bool pqChartPixelScale::isLogScaleValid ( const pqChartValue min,
const pqChartValue max 
) [static]

Member Data Documentation

Stores the log scale minimum.

Definition at line 214 of file pqChartPixelScale.h.


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