Rogue Wave Views 5.5.1 |
Rogue Wave Views |
Rogue Wave Views Documentation Home |
This renderer translates a map feature whose geometry is an IlvMapText
into an IlvLabel
.
More...
#include <ilviews/maps/rendering/textrdr.h>
Public Member Functions | |
IlvDefaultTextRenderer (const IlvDefaultTextRenderer &source) | |
Copies the constructor. | |
IlvDefaultTextRenderer (IlvDisplay *display) | |
Creates an instance of a text renderer. | |
virtual IlvFeatureRenderer * | copy () const |
Copies the object. | |
IlvPalette * | getPalette () const |
Returns the palette used to create the graphic object. | |
IlvColor * | getTextColor () const |
Returns the color of labels produced by this renderer. | |
IlvFont * | getTextFont () const |
Returns the font of the generated graphic object. | |
virtual IlvGraphic * | makeGraphic (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 . |
This renderer translates a map feature whose geometry is an IlvMapText
into an IlvLabel
.
Library: ilvmaps
IlvDefaultTextRenderer::IlvDefaultTextRenderer | ( | IlvDisplay * | display | ) |
Creates an instance of a text renderer.
display | The display used to create the graphic object. |
IlvDefaultTextRenderer::IlvDefaultTextRenderer | ( | const IlvDefaultTextRenderer & | source | ) |
Copies the constructor.
source | The object to be copied. |
virtual IlvFeatureRenderer* IlvDefaultTextRenderer::copy | ( | ) | const [virtual] |
IlvPalette* IlvDefaultTextRenderer::getPalette | ( | ) | const |
Returns the palette used to create the graphic object.
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. IlvColor* IlvDefaultTextRenderer::getTextColor | ( | ) | const |
Returns the color of labels produced by this renderer.
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.
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.
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). |
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.
palette | The palette. |
IlvMapsError IlvDefaultTextRenderer::setTextColor | ( | const char * | colorName | ) |
Sets the color of labels produced by this renderer.
colorName | The name of the color. |
setPalette
. 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.
setPalette
. color | The color. |
IlvMapsError IlvDefaultTextRenderer::setTextFont | ( | const char * | fontName | ) |
Sets the font of the generated graphic object.
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.
setPalette
. 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.
file | The output file. |
Implements IlvFeatureRenderer.
© 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.