Rogue Wave Views
Charts Package API Reference Guide
Product Documentation:

Rogue Wave Views
Documentation Home
List of all members | Public Member Functions
IlvChartGradientPointInfo Class Reference

Sets the data point colors according to a gradient. More...

#include <ilviews/charts/data.h>

Inheritance diagram for IlvChartGradientPointInfo:
IlvChartDataPointInfo

Public Member Functions

 IlvChartGradientPointInfo (IlDouble *values, const IlArray &colors)
 Constructor. More...
 
 IlvChartGradientPointInfo (const IlvChartGradientPointInfo &pointInfo)
 Copy of the Constructor. More...
 
 IlvChartGradientPointInfo (IlvInputFile &file)
 Constructor. More...
 
virtual ~IlvChartGradientPointInfo ()
 Destructor.
 
virtual IlBoolean getPalette (const IlvChartDataSet *dataSet, IlUInt idx, const IlvAbstractChartDisplayer *disp, const IlvPalette *defaultPalette, IlvPalette *returnPalette) const
 Gets the specific palette for a point in the same collection. More...
 
- Public Member Functions inherited from IlvChartDataPointInfo
 IlvChartDataPointInfo (IlvPalette *palette=0)
 Constructor. More...
 
 IlvChartDataPointInfo (const IlvChartDataPointInfo &pointInfo)
 Copy Constructor. More...
 
 IlvChartDataPointInfo (IlvInputFile &file)
 Constructor. More...
 
virtual ~IlvChartDataPointInfo ()
 Destructor. More...
 
virtual IlBoolean boundingBox (const IlvPoint &point, const IlvChartDataSet *dataSet, IlUInt ptidx, const IlvChartGraphic *chart, IlvRect &bbox, const IlvTransformer *t=0) const
 Returns the bounding box of the graphical information object drawn next to the representation of the data point. More...
 
virtual IlvChartDataPointInfocopy () const
 Virtual copy constructor. More...
 
virtual void draw (const IlvPoint &point, const IlvChartDataSet *dataSet, IlUInt ptidx, const IlvChartGraphic *chart, IlvPort *dst, const IlvTransformer *t=0, const IlvRegion *clip=0) const
 Draws a graphical information object next to the representation of the data point. More...
 
IlvPalettegetPalette () const
 Returns the specific palette. More...
 
void lock ()
 Locks the current IlvChartDataPointInfo object. More...
 
IlvOutputFilesave (IlvOutputFile &file) const
 Writes a complete description of the current object in a file. More...
 
void setForeground (IlvColor *color)
 Sets the foreground color for the specific palette. More...
 
virtual void setMode (IlvDrawMode mode)
 Sets the drawing mode. More...
 
virtual void setOverwrite (IlBoolean o)
 Sets the way the drawing member functions operate. More...
 
void setPalette (IlvPalette *pal)
 Sets the specific palette. More...
 
void unLock ()
 Unlocks the current IlvChartDataPointInfo object. More...
 
virtual void write (IlvOutputFile &file) const
 Writes the attributes of the current object in a file. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from IlvChartDataPointInfo
static IlvChartDataPointInfoLoad (IlvInputFile &file)
 Reads a point information object from a file. More...
 
static IlvChartDataPointInfoRead (IlvInputFile &file)
 Reads the attributes of a point information object from a file. More...
 

Detailed Description

Sets the data point colors according to a gradient.

Library: ilvcharts

A Point Info that computes the color of a data point according to a gradient specification.

The y-value of a data point is used to determine its color according to the transition values of the gradient.

Note
Limitation: this class does not work correctly on 8-bit displays. If you really need to use a gradient point info in 8-bit color mode, you must create a subclass of IlvChartGradientPointInfo as follows:
  • allocate a known number of colors in the constructor.
  • lock all allocated colors in the constructor.
  • unlock all allocated colors in the destructor.
  • redefine the getPalette() method to return a palette using the appropriate color from the allocated color set.

Constructor & Destructor Documentation

IlvChartGradientPointInfo::IlvChartGradientPointInfo ( IlDouble values,
const IlArray &  colors 
)

Constructor.

Initializes a new IlvChartGradientPointInfo object.

Parameters
valuesThe transition values of the gradient. The provided array must be sorted in ascending order.
colorsThe colors associated with the transition values.

There must be as many values as colors.

IlvChartGradientPointInfo::IlvChartGradientPointInfo ( const IlvChartGradientPointInfo pointInfo)

Copy of the Constructor.

Initializes a new IlvChartGradientPointInfo object which is a copy of pointInfo.

Parameters
pointInfoThe point information that is used to initialize the current one.
IlvChartGradientPointInfo::IlvChartGradientPointInfo ( IlvInputFile file)

Constructor.

Initializes a new IlvChartGradientPointInfo object from the description read in the input file named file.

Parameters
fileThe file used to initialize the current data point information.

Member Function Documentation

virtual IlBoolean IlvChartGradientPointInfo::getPalette ( const IlvChartDataSet dataSet,
IlUInt  idx,
const IlvAbstractChartDisplayer disp,
const IlvPalette defaultPalette,
IlvPalette returnPalette 
) const
virtual

Gets the specific palette for a point in the same collection.

Parameters
dataSetThe data set to which the point belongs.
idxThe index of the point.
dispThe displayer which displays the data set.
defaultPaletteThe default palette.
returnPaletteA pointer to the specific palette that is changed according to how the data point is drawn.
Returns
IlTrue if returnPalette is changed.

Reimplemented from IlvChartDataPointInfo.


© Copyright 2016, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.