rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Maps Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

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

List of all members.

Public Member Functions

 IlvDefaultFeatureRenderer (const IlvDefaultFeatureRenderer &source)
 Creates an IlvDefaultFeatureRenderer by copying an existing one.
 IlvDefaultFeatureRenderer (IlvDisplay *display)
 Initializes an instance of the renderer.
IlvFeatureRenderergetAreaRenderer () const
 Returns the renderer used to translate areas into graphic objects.
IlvFeatureRenderergetCurveRenderer () const
 Returns the renderer used to translate curves into graphic objects.
IlvFeatureRenderergetImageRenderer () const
 Returns the renderer used to translate images into graphic objects.
IlvFeatureRenderergetPointRenderer () const
 Returns the renderer used to translate points into graphic objects.
IlvFeatureRenderergetRasterRenderer () const
 Returns the renderer used to translate rasters into graphic objects.
IlvFeatureRenderergetTextRenderer () const
 Returns The renderer used to translate texts into graphic objects.
virtual IlvGraphicmakeGraphic (const IlvMapFeature &mapFeature, const IlvMapInfo &targetMapInfo, IlvMapsError &status) const
 Translates an IlvMapFeature into a graphic object.
void setAreaRenderer (const IlvFeatureRenderer *areaRenderer)
 Sets the graphic renderer used to translate areas into graphic objects.
void setCurveRenderer (const IlvFeatureRenderer *curveRenderer)
 Sets the graphic renderer used to translate curves into graphic objects.
void setImageRenderer (const IlvFeatureRenderer *imageRenderer)
 Sets the graphic renderer used to translate images into graphic objects.
void setPointRenderer (const IlvFeatureRenderer *pointRenderer)
 Sets the graphic renderer used to translate points into graphic objects.
void setRasterRenderer (const IlvFeatureRenderer *rasterRenderer)
 Sets the graphic renderer used to translate rasters into graphic objects.
void setTextRenderer (const IlvFeatureRenderer *textRenderer)
 Sets the graphic renderer used to translate texts into graphic objects.

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

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::IlvDefaultFeatureRenderer ( IlvDisplay display  ) 

Initializes an instance of the renderer.

Parameters:
display The display used to create the graphic objects.
persistent Specifies if the renderer must be saved by the objects that use it.
IlvDefaultFeatureRenderer::IlvDefaultFeatureRenderer ( const IlvDefaultFeatureRenderer source  ) 

Creates an IlvDefaultFeatureRenderer by copying an existing one.

Parameters:
source The renderer to be copied.

Member Function Documentation

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

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

Parameters:
mapFeature The map feature to be translated.
targetMapInfo The IlvMapInfo that specifies the projection in which the graphic object must be returned.
status Set to an error code if the renderer cannot process the map feature.
Returns:
An IlvGraphic or a null pointer if no appropriate renderer was found, or if a severe error occurs during the rendering process.

Reimplemented in IlvS57Renderer.

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.
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.
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.
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.
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.
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.
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:
feature The map feature to be translated.
targetMapInfo This parameter specifies the projection in which the graphic object must be returned. If this projection is not defined (targetMapInfo.getProjection() is NULL), the graphic object is returned to the projection of the map feature (only the map adapter is used)
status Is 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 a null pointer if a severe error occurred.

Implements IlvFeatureRenderer.

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

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

Parameters:
mapFeature The map feature to be translated.
targetMapInfo The IlvMapInfo that specifies the projection in which the graphic object must be returned.
status Set to an error code if the renderer cannot process the map feature.
Returns:
An IlvGraphic or a null pointer if no appropriate renderer was found, or if a severe error occurs during the rendering process.
void IlvDefaultFeatureRenderer::setAreaRenderer ( const IlvFeatureRenderer areaRenderer  ) 

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

Parameters:
areaRenderer The area renderer.
void IlvDefaultFeatureRenderer::setCurveRenderer ( const IlvFeatureRenderer curveRenderer  ) 

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

Parameters:
curveRenderer The curve renderer.
void IlvDefaultFeatureRenderer::setImageRenderer ( const IlvFeatureRenderer imageRenderer  ) 

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

Parameters:
imageRenderer The image renderer.
void IlvDefaultFeatureRenderer::setPointRenderer ( const IlvFeatureRenderer pointRenderer  ) 

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

Parameters:
pointRenderer The point renderer.
void IlvDefaultFeatureRenderer::setRasterRenderer ( const IlvFeatureRenderer rasterRenderer  ) 

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

Parameters:
rasterRenderer The raster renderer.
void IlvDefaultFeatureRenderer::setTextRenderer ( const IlvFeatureRenderer textRenderer  ) 

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

Parameters:
textRenderer The text renderer.
 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.