Rogue Wave Views
Maps Package API Reference Guide
Product Documentation:

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

This feature renderer can translate all the predefined geometries of Rogue Wave Views into graphic objects. More...

#include <ilviews/maps/dftrenderer.h>

Inheritance diagram for IlvDefaultFeatureRenderer:
IlvFeatureRenderer IlvS57Renderer

Public Member Functions

 IlvDefaultFeatureRenderer (IlvDisplay *display)
 Initializes an instance of the renderer. More...
 
 IlvDefaultFeatureRenderer (const IlvDefaultFeatureRenderer &source)
 Initializes an IlvDefaultFeatureRenderer by copying an existing one. More...
 
virtual ~IlvDefaultFeatureRenderer ()
 Destructor.
 
IlvFeatureRenderergetAreaRenderer () const
 Returns the renderer used to translate areas into graphic objects. More...
 
IlvFeatureRenderergetCurveRenderer () const
 Returns the renderer used to translate curves into graphic objects. More...
 
IlvFeatureRenderergetImageRenderer () const
 Returns the renderer used to translate images into graphic objects. More...
 
IlvFeatureRenderergetPointRenderer () const
 Returns the renderer used to translate points into graphic objects. More...
 
IlvFeatureRenderergetRasterRenderer () const
 Returns the renderer used to translate rasters into graphic objects. More...
 
IlvFeatureRenderergetTextRenderer () const
 Returns The renderer used to translate texts into graphic objects. More...
 
virtual IlvGraphicmakeGraphic (const IlvMapFeature &mapFeature, const IlvMapInfo &targetMapInfo, IlvMapsError &status) const
 Translates an IlvMapFeature into a graphic object. More...
 
void setAreaRenderer (const IlvFeatureRenderer *areaRndr)
 Sets the graphic renderer used to translate areas into graphic objects. More...
 
void setCurveRenderer (const IlvFeatureRenderer *curveRndr)
 Sets the graphic renderer used to translate curves into graphic objects. More...
 
void setImageRenderer (const IlvFeatureRenderer *imageRndr)
 Sets the graphic renderer used to translate images into graphic objects. More...
 
void setPointRenderer (const IlvFeatureRenderer *pointRndr)
 Sets the graphic renderer used to translate points into graphic objects. More...
 
void setRasterRenderer (const IlvFeatureRenderer *rasterRndr)
 Sets the graphic renderer used to translate rasters into graphic objects. More...
 
void setTextRenderer (const IlvFeatureRenderer *textRndr)
 Sets the graphic renderer used to translate texts into graphic objects. More...
 
- Public Member Functions inherited from IlvFeatureRenderer
virtual IlvFeatureRenderercopy () const =0
 Copies the object. More...
 
IlvDisplaygetDisplay () const
 Returns the renderer display. More...
 
IlBoolean isPersistent () const
 Checks if the renderer can be saved. More...
 
void save (IlvOutputFile &file) const
 Saves the object to an IlvOutputFile. More...
 
virtual void write (IlvOutputFile &file) const =0
 Writes the renderer to an IlvOutputStream. More...
 

Protected Member Functions

virtual IlvGraphicdispatch (const IlvMapFeature &mapFeature, const IlvMapInfo &targetMapInfo, IlvMapsError &status) const
 Dispatches a map feature to the renderer specialized to render the feature geometry. More...
 
virtual IlvGraphicmakeGraphicFromGeometryCollection (const IlvMapFeature &mapFeature, const IlvMapInfo &targetMapInfo, IlvMapsError &status) const
 This function is called by dispatch for the map features whose geometry is a collection of subgeometries. More...
 
- Protected Member Functions inherited from IlvFeatureRenderer
 IlvFeatureRenderer (IlvDisplay *display, IlBoolean persistent=IlTrue)
 Constructor. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from IlvFeatureRenderer
static IlvFeatureRendererLoad (IlvInputFile &file)
 Loads a renderer from an IlvInputFile. More...
 

Detailed Description

This feature renderer can translate all the predefined geometries of Rogue Wave Views into graphic objects.

Library: ilvmaps

It dispatches the makeGraphic() calls to a specialized feature renderer depending on the geometry of the map feature. Each specialized feature renderer is initialized with a default value, but it can be changed.

Constructor & Destructor Documentation

§ IlvDefaultFeatureRenderer() [1/2]

IlvDefaultFeatureRenderer::IlvDefaultFeatureRenderer ( IlvDisplay display)

Initializes an instance of the renderer.

Parameters
displayThe display used to create the graphic objects.

§ IlvDefaultFeatureRenderer() [2/2]

IlvDefaultFeatureRenderer::IlvDefaultFeatureRenderer ( const IlvDefaultFeatureRenderer source)

Initializes an IlvDefaultFeatureRenderer by copying an existing one.

Parameters
sourceThe renderer to be copied.

Member Function Documentation

§ dispatch()

virtual IlvGraphic* IlvDefaultFeatureRenderer::dispatch ( const IlvMapFeature mapFeature,
const IlvMapInfo targetMapInfo,
IlvMapsError &  status 
) const
protectedvirtual

Dispatches a map feature to the renderer specialized to render the feature geometry.

Parameters
mapFeatureThe map feature to be translated.
targetMapInfoThe IlvMapInfo that specifies the projection in which the graphic object must be returned.
statusSet to an error code if the renderer cannot process the map feature.
Returns
An IlvGraphic or 0 if no appropriate renderer was found, or if a severe error occurs during the rendering process.

Reimplemented in IlvS57Renderer.

§ getAreaRenderer()

IlvFeatureRenderer* IlvDefaultFeatureRenderer::getAreaRenderer ( ) const

Returns the renderer used to translate areas into graphic objects.

Returns
An IlvFeatureRenderer that can be modified, but that should not be deleted.

§ getCurveRenderer()

IlvFeatureRenderer* IlvDefaultFeatureRenderer::getCurveRenderer ( ) const

Returns the renderer used to translate curves into graphic objects.

Returns
An IlvFeatureRenderer that can be modified, but that should not be deleted.

§ getImageRenderer()

IlvFeatureRenderer* IlvDefaultFeatureRenderer::getImageRenderer ( ) const

Returns the renderer used to translate images into graphic objects.

Returns
An IlvFeatureRenderer that can be modified, but that should not be deleted.

§ getPointRenderer()

IlvFeatureRenderer* IlvDefaultFeatureRenderer::getPointRenderer ( ) const

Returns the renderer used to translate points into graphic objects.

Returns
An IlvFeatureRenderer that can be modified, but that should not be deleted.

§ getRasterRenderer()

IlvFeatureRenderer* IlvDefaultFeatureRenderer::getRasterRenderer ( ) const

Returns the renderer used to translate rasters into graphic objects.

Returns
An IlvFeatureRenderer that can be modified, but that should not be deleted.

§ getTextRenderer()

IlvFeatureRenderer* IlvDefaultFeatureRenderer::getTextRenderer ( ) const

Returns The renderer used to translate texts into graphic objects.

Returns
An IlvFeatureRenderer that can be modified, but that should not be deleted.

§ makeGraphic()

virtual IlvGraphic* IlvDefaultFeatureRenderer::makeGraphic ( const IlvMapFeature mapFeature,
const IlvMapInfo targetMapInfo,
IlvMapsError &  status 
) const
virtual

Translates an IlvMapFeature into a graphic object.

If the targetMapInfo has a non-null projection, or a projection that is not an instance of IlvUnknownProjection, the graphic object is projected to the projection system of targetMapInfo. Otherwise, only the map adapter of targetMapInfo is used to convert the feature coordinate into the manager coordinate system.

Parameters
mapFeatureThe map feature to be translated.
targetMapInfoThis parameter specifies the projection in which the graphic object must be returned. If this projection is not defined (targetMapInfo.getProjection() is 0), the graphic object is returned to the projection of the map feature (only the map adapter is used)
statusIs set to an error code if the renderer cannot process the map feature (most of the time, because the renderer does not support the feature geometry, but it can also indicate that a projection error occurred).
Returns
An IlvGraphic or 0 if a severe error occurred.

Implements IlvFeatureRenderer.

§ makeGraphicFromGeometryCollection()

virtual IlvGraphic* IlvDefaultFeatureRenderer::makeGraphicFromGeometryCollection ( const IlvMapFeature mapFeature,
const IlvMapInfo targetMapInfo,
IlvMapsError &  status 
) const
protectedvirtual

This function is called by dispatch for the map features whose geometry is a collection of subgeometries.

Parameters
mapFeatureThe map feature to be translated.
targetMapInfoThe IlvMapInfo that specifies the projection in which the graphic object must be returned.
statusSet to an error code if the renderer cannot process the map feature.
Returns
An IlvGraphic or 0 if no appropriate renderer was found, or if a severe error occurs during the rendering process.

§ setAreaRenderer()

void IlvDefaultFeatureRenderer::setAreaRenderer ( const IlvFeatureRenderer areaRndr)

Sets the graphic renderer used to translate areas into graphic objects.

Parameters
areaRndrThe area renderer.

§ setCurveRenderer()

void IlvDefaultFeatureRenderer::setCurveRenderer ( const IlvFeatureRenderer curveRndr)

Sets the graphic renderer used to translate curves into graphic objects.

Parameters
curveRndrThe curve renderer.

§ setImageRenderer()

void IlvDefaultFeatureRenderer::setImageRenderer ( const IlvFeatureRenderer imageRndr)

Sets the graphic renderer used to translate images into graphic objects.

Parameters
imageRndrThe image renderer.

§ setPointRenderer()

void IlvDefaultFeatureRenderer::setPointRenderer ( const IlvFeatureRenderer pointRndr)

Sets the graphic renderer used to translate points into graphic objects.

Parameters
pointRndrThe point renderer.

§ setRasterRenderer()

void IlvDefaultFeatureRenderer::setRasterRenderer ( const IlvFeatureRenderer rasterRndr)

Sets the graphic renderer used to translate rasters into graphic objects.

Parameters
rasterRndrThe raster renderer.

§ setTextRenderer()

void IlvDefaultFeatureRenderer::setTextRenderer ( const IlvFeatureRenderer textRndr)

Sets the graphic renderer used to translate texts into graphic objects.

Parameters
textRndrThe text renderer.

© 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.