Rogue Wave Views 5.6 |
Rogue Wave Views |
Rogue Wave Views Documentation Home |
Grid displayer subclass for Cartesian charts. More...
#include <ilviews/charts/grid.h>
Public Member Functions | |
IlvRectangularGridDisplayer (IlvPalette *major=0, IlvPalette *minor=0) | |
Constructor. | |
virtual IlvCircularGridDisplayer * | createCircularGrid (IlvCircularScaleDisplayer *ref) const |
Creates a circular grid instantiated with the current grid parameters and returns it. | |
virtual IlvRadialGridDisplayer * | createRadialGrid () const |
Creates a radial grid instantiated with the current grid parameters and returns it. | |
virtual void | drawTick (IlUInt tickIdx, const IlvPoint &tickPoint, IlDouble tickAngle, IlBoolean major, IlvPort *dst, const IlvRegion *givenClip) const |
Draws the grid line for a given tick of the scale with which the grid is associated. |
Grid displayer subclass for Cartesian charts.
Library: ilvcharts
This class is a subclass of IlvAbstractGridDisplayer
that allows you to define a rectangular grid composed of straight lines. This kind of grid is used only for Cartesian charts. A Cartesian chart is a chart that displays data expressed in Cartesian coordinates with abscissa and ordinate scales that are orthogonal.
The scales of a Cartesian chart are drawn using instances of the IlvRectangularScaleDisplayer
class. Therefore, the rectangular grid can be used only with an IlvRectangularScaleDisplayer
object and when the projector used to project the data is an IlvCartesianProjector
object.
You can see an example of rectangular grids on the figure below where a grid is set for each of the scales of the displayed chart.
IlvAbstractGridDisplayer
. IlvRectangularGridDisplayer::IlvRectangularGridDisplayer | ( | IlvPalette * | major = 0 , |
|
IlvPalette * | minor = 0 | |||
) |
Constructor.
Initializes a new IlvRectangularGridDisplayer
object. To do this, the constructor calls the corresponding constructor IlvAbstractGridDisplayer::IlvAbstractGridDisplayer(IlvPalette*, IlvPalette*)
of its parent class.
major | The new palette that will be used to draw the major lines of the current grid. | |
minor | The new palette that will be used to draw the minor lines of the current grid. |
virtual IlvCircularGridDisplayer* IlvRectangularGridDisplayer::createCircularGrid | ( | IlvCircularScaleDisplayer * | ref | ) | const [virtual] |
Creates a circular grid instantiated with the current grid parameters and returns it.
virtual IlvRadialGridDisplayer* IlvRectangularGridDisplayer::createRadialGrid | ( | ) | const [virtual] |
Creates a radial grid instantiated with the current grid parameters and returns it.
virtual void IlvRectangularGridDisplayer::drawTick | ( | IlUInt | tickIdx, | |
const IlvPoint & | tickPoint, | |||
IlDouble | tickAngle, | |||
IlBoolean | major, | |||
IlvPort * | dst, | |||
const IlvRegion * | clip | |||
) | const [virtual] |
Draws the grid line for a given tick of the scale with which the grid is associated.
Draws the grid line for the scale tick of index tickIdx, defined by the point tickPoint, which is its position in pixels, and by its angle tickAngle.
The grid line is drawn in the given port named dst using the clipping region clip.
tickIdx | The index of the tick on the scale to which the grid is attached. | |
tickPoint | The position in pixels of the scale tick for which the grid line is drawn. This point is already transformed. | |
tickAngle | The angle of the scale tick for which the grid line is drawn. | |
major | A Boolean value indicating whether the tick is a major step or a substep. | |
dst | The port where the grid line is drawn. | |
clip | The clipping region. |
IlvSingleScaleDisplayer::drawTick
method. Therefore, the grid line is drawn when the scale tick is drawn.IlvAbstractGridDisplayer::setDataDisplayArea
method before the grid lines are drawn. This area can therefore be fetched with the IlvAbstractGridDisplayer::getDataDisplayArea
method. Implements IlvAbstractGridDisplayer.
© 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.