rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Maps Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IlvDefaultTextRenderer Class Reference

This renderer translates a map feature whose geometry is an IlvMapText into an IlvLabel. More...

#include <ilviews/maps/rendering/textrdr.h>

Inheritance diagram for IlvDefaultTextRenderer:
IlvFeatureRenderer

List of all members.

Public Member Functions

 IlvDefaultTextRenderer (const IlvDefaultTextRenderer &source)
 Copies the constructor.
 IlvDefaultTextRenderer (IlvDisplay *display)
 Creates an instance of a text renderer.
virtual IlvFeatureRenderercopy () const
 Copies the object.
IlvPalettegetPalette () const
 Returns the palette used to create the graphic object.
IlvColorgetTextColor () const
 Returns the color of labels produced by this renderer.
IlvFontgetTextFont () const
 Returns the font of the generated graphic object.
virtual IlvGraphicmakeGraphic (const IlvMapFeature &feature, const IlvMapInfo &targetMapInfo, IlvMapsError &status) const
 Translates an IlvMapFeature into a graphic object.
void setPalette (IlvPalette *palette)
 Sets the palette used to create the graphic object.
IlvMapsError setTextColor (const char *colorName)
 Sets the color of labels produced by this renderer.
void setTextColor (IlvColor *color)
 Sets the color of labels produced by this renderer.
IlvMapsError setTextFont (const char *fontName)
 Sets the font of the generated graphic object.
void setTextFont (IlvFont *font)
 Sets the font of the generated graphic objects.
virtual void write (IlvOutputFile &) const
 Writes the renderer to an IlvOutputStream.

Detailed Description

This renderer translates a map feature whose geometry is an IlvMapText into an IlvLabel.

Library: ilvmaps


Constructor & Destructor Documentation

IlvDefaultTextRenderer::IlvDefaultTextRenderer ( IlvDisplay display  ) 

Creates an instance of a text renderer.

Parameters:
display The display used to create the graphic object.
IlvDefaultTextRenderer::IlvDefaultTextRenderer ( const IlvDefaultTextRenderer source  ) 

Copies the constructor.

Parameters:
source The object to be copied.

Member Function Documentation

virtual IlvFeatureRenderer* IlvDefaultTextRenderer::copy (  )  const [virtual]

Copies the object.

Returns:
A copy of this IlvFeatureRenderer.

Implements IlvFeatureRenderer.

IlvPalette* IlvDefaultTextRenderer::getPalette (  )  const

Returns the palette used to create the graphic object.

Returns:
IlvPalette that should not be modified, because it can potentially be shared by other objects. However, it is possible to lock it if an other object has to use it.
See also:
IlvResource::lock()
IlvColor* IlvDefaultTextRenderer::getTextColor (  )  const

Returns the color of labels produced by this renderer.

Returns:
A null pointer if no color is specified (in this case, the default display foreground color is used), or an IlvColor that should not be modified, because it can potentially be shared by other objects. However, it is possible to lock it if an other object has to use it.
IlvFont* IlvDefaultTextRenderer::getTextFont (  )  const

Returns the font of the generated graphic object.

Returns:
A null pointer if no font is specified (in this case, the default display font is used), or an IlvFont that should not be modified, because it can potentially be shared by other objects. However, it is possible to lock it if an other object has to use it.
virtual IlvGraphic* IlvDefaultTextRenderer::makeGraphic ( const IlvMapFeature feature,
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.

void IlvDefaultTextRenderer::setPalette ( IlvPalette palette  ) 

Sets the palette used to create the graphic object.

Parameters:
palette The palette.
IlvMapsError IlvDefaultTextRenderer::setTextColor ( const char *  colorName  ) 

Sets the color of labels produced by this renderer.

Parameters:
colorName The name of the color.
Warning:
[note] This function is a convenience function that can be used instead of setPalette.
Returns:
IlvMapsError::NoError() or IlvMaps::IllegalArgument() if the color name cannot be translated into a color.
void IlvDefaultTextRenderer::setTextColor ( IlvColor color  ) 

Sets the color of labels produced by this renderer.

Warning:
[note] This function is a convenience function that can be used instead of setPalette.
Parameters:
color The color.
IlvMapsError IlvDefaultTextRenderer::setTextFont ( const char *  fontName  ) 

Sets the font of the generated graphic object.

Warning:
[note] This function is a convenience function that can be used instead of setPalette
Returns:
IlvMapsError::NoError() or IlvMaps::IllegalArgument() if the font name cannot be translated into a color.
void IlvDefaultTextRenderer::setTextFont ( IlvFont font  ) 

Sets the font of the generated graphic objects.

Warning:
[note] This function is a convenience function that can be used instead of setPalette.
Parameters:
font The font of the generated graphic object.
virtual void IlvDefaultTextRenderer::write ( IlvOutputFile file  )  const [virtual]

Writes the renderer to an IlvOutputStream.

This function must be reimplemented by the subclasses of IlvFeatureRenderer, but it should not be called directly by the application. For more information about subclassing an IlvFeatureRenderer, refer to the User Manual of Rogue Wave Views Maps.

Parameters:
file The output file.
See also:
save

Implements IlvFeatureRenderer.

 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.