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)
 Initializes a new IlvChartGradientPointInfo object. More...
 
 IlvChartGradientPointInfo (const IlvChartGradientPointInfo &pointInfo)
 Initializes a new IlvChartGradientPointInfo object as a copy of another IlvChartGradientPointInfo. More...
 
 IlvChartGradientPointInfo (IlvInputFile &file)
 Initializes a new IlvChartGradientPointInfo object from an input file. More...
 
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)
 Initializes a new IlvChartDataPointInfo object. More...
 
 IlvChartDataPointInfo (const IlvChartDataPointInfo &pointInfo)
 Initializes a new IlvChartDataPointInfo object as a copy of another IlvChartDataPointInfo. More...
 
 IlvChartDataPointInfo (IlvInputFile &file)
 Initializes a new IlvChartDataPointInfo object from an input file. 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
 Creates and returns a copy of the current object. 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() [1/3]

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

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() [2/3]

IlvChartGradientPointInfo::IlvChartGradientPointInfo ( const IlvChartGradientPointInfo pointInfo)

Initializes a new IlvChartGradientPointInfo object as a copy of another IlvChartGradientPointInfo.

Parameters
pointInfoThe point information that is used to initialize the new point information object.

§ IlvChartGradientPointInfo() [3/3]

IlvChartGradientPointInfo::IlvChartGradientPointInfo ( IlvInputFile file)

Initializes a new IlvChartGradientPointInfo object from an input file.

The new IlvChartGradientPointInfo object description is read in the input file named file.

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

Member Function Documentation

§ getPalette()

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 2018, 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.