rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Charts Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IlvChartGradientPointInfo Class Reference

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

#include <ilviews/charts/data.h>

Inheritance diagram for IlvChartGradientPointInfo:
IlvChartDataPointInfo

List of all members.

Public Member Functions

 IlvChartGradientPointInfo (IlvInputFile &file)
 Constructor.
 IlvChartGradientPointInfo (const IlvChartGradientPointInfo &pointInfo)
 Copy of the Constructor.
 IlvChartGradientPointInfo (IlDouble *values, const IlArray &colors)
 Constructor.
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.

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.

Warning:
[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:
values The transition values of the gradient. The provided array must be sorted in ascending order.
colors The 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:
pointInfo The 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:
file The 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:
dataSet The data set to which the point belongs.
idx The index of the point.
disp The displayer which displays the data set.
defaultPalette The default palette.
returnPalette A pointer to the specific palette that is changed according to how the data point is drawn.
Returns:
true if the returnPalette is changed.

Reimplemented from IlvChartDataPointInfo.

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

© Copyright 2012, 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.