Views
Charts Package API Reference Guide
Product Documentation:
Views Documentation Home
List of all members | Public Member Functions
IlvRadialGridDisplayer Class Reference

Grid displayer subclass for the abscissa scale of polar charts. More...

#include <ilviews/charts/grid.h>

Inheritance diagram for IlvRadialGridDisplayer:
IlvAbstractGridDisplayer IlvValueInterface

Public Member Functions

 IlvRadialGridDisplayer (IlvPalette *major=0, IlvPalette *minor=0)
 Constructor. More...
 
virtual IlvRectangularGridDisplayercreateRectangularGrid () const
 Creates and returns a rectangular grid instantiated with the current grid parameters. More...
 
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. More...
 
- Public Member Functions inherited from IlvAbstractGridDisplayer
virtual ~IlvAbstractGridDisplayer ()
 Destructor. More...
 
virtual IlvAbstractGridDisplayercopy () const =0
 Virtual copy constructor. More...
 
void drawMinorLines (IlBoolean flag)
 Specifies that the minor lines are drawn. More...
 
IlvPalettegetDefaultPalette () const
 Returns the palette used by default. More...
 
IlvDrawOrder getDrawOrder () const
 Returns the drawing order for the current grid. More...
 
IlvPalettegetMajorPalette () const
 Returns the palette for the major lines. More...
 
IlvPalettegetMinorPalette () const
 Returns the palette for the minor lines. More...
 
const IlvAbstractProjectorgetProjector () const
 Returns the object used to project the data into screen coordinates. More...
 
const IlvSingleScaleDisplayergetTickScale () const
 Returns the scale with which the current grid is associated. More...
 
IlBoolean isDrawingMinorLines () const
 Indicates whether the minor lines are drawn. More...
 
IlBoolean isVisible () const
 Indicates whether the current grid is visible. More...
 
IlvOutputFilesave (IlvOutputFile &file) const
 Writes a complete description of the current object in a file. More...
 
void setDrawOrder (IlvDrawOrder drawOrder)
 Sets the drawing order for the current grid. More...
 
void setMajorPalette (IlvPalette *pal)
 Sets the palette for the major lines. More...
 
void setMinorPalette (IlvPalette *pal)
 Sets the palette for the minor lines. 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 setVisible (IlBoolean visible)
 Specifies whether the current grid is visible. 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 IlvAbstractGridDisplayer
static IlvAbstractGridDisplayerLoad (IlvInputFile &file)
 Reads a grid object from a file. More...
 
- Protected Member Functions inherited from IlvAbstractGridDisplayer
 IlvAbstractGridDisplayer (const IlvAbstractGridDisplayer &grid)
 Constructor. More...
 
 IlvAbstractGridDisplayer (IlvInputFile &file)
 Constructor. More...
 
 IlvAbstractGridDisplayer (IlvPalette *major=0, IlvPalette *minor=0)
 Constructor. More...
 

Detailed Description

Grid displayer subclass for the abscissa scale of polar charts.

Library: ilvcharts

This class is a subclass of IlvAbstractGridDisplayer that allows you to define a radial grid composed of radial straight lines. This kind of grid is used only for polar charts. A polar chart displays data expressed in polar coordinates with an abscissa scale that is circular and ordinate scales that are radial. In a polar chart, the radial grid is used to draw the grid lines for the ticks of the circular scale, which means that it is used for the abscissa scale. If you want to set a grid on an ordinate scale of a polar chart, you must use a circular grid which is represented by an instance of the IlvCircularGridDisplayer class.

In a polar chart, the abscissa scale is drawn by using an instance of the IlvCircularScaleDisplayer class and the ordinate scales by using instances of the IlvRectangularScaleDisplayer class. Therefore, the radial grid can only be used with an IlvCircularScaleDisplayer object and when the projector used to project the data is an IlvPolarProjector object.

You can see an example of a radial grid on the figure below where a grid is set for the abscissa scale of the displayed chart.

See also
IlvAbstractGridDisplayer, IlvCircularGridDisplayer.

Constructor & Destructor Documentation

◆ IlvRadialGridDisplayer()

IlvRadialGridDisplayer::IlvRadialGridDisplayer ( IlvPalette major = 0,
IlvPalette minor = 0 
)

Constructor.

Initializes a new IlvRadialGridDisplayer object. To do this, the constructor calls the corresponding constructor IlvAbstractGridDisplayer::IlvAbstractGridDisplayer(IlvPalette*, IlvPalette*) of its parent class.

Parameters
majorThe new palette that will be used to draw the major lines of the current grid.
minorThe new palette that will be used to draw the minor lines of the current grid.

Member Function Documentation

◆ createRectangularGrid()

virtual IlvRectangularGridDisplayer* IlvRadialGridDisplayer::createRectangularGrid ( ) const
virtual

Creates and returns a rectangular grid instantiated with the current grid parameters.

Returns
The rectangular grid that is created.

◆ drawTick()

virtual void IlvRadialGridDisplayer::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.

Parameters
tickIdxThe index of the tick on the scale to which the grid is attached.
tickPointThe position in pixels of the scale tick for which the grid line is drawn. This point is already transformed.
tickAngleThe angle of the scale tick for which the grid line is drawn.
majorA Boolean value indicating whether the tick is a major step or a substep.
dstThe port where the grid line is drawn.
clipThe clipping region.
Note
This method is called inside the IlvSingleScaleDisplayer::drawTick() method. Therefore, the grid line is drawn when the scale tick is drawn.
The data display area is automatically set by the scale with the IlvAbstractGridDisplayer::setDataDisplayArea() method before the grid lines are drawn. This area can therefore be fetched with the IlvAbstractGridDisplayer::getDataDisplayArea() method.

Implements IlvAbstractGridDisplayer.