This renderer translates a map feature whose geometry is an IlvMapText
into an IlvLabel
.
More...
#include <ilviews/maps/rendering/textrdr.h>
This renderer translates a map feature whose geometry is an IlvMapText
into an IlvLabel
.
Library: ilvmaps
◆ IlvDefaultTextRenderer() [1/2]
IlvDefaultTextRenderer::IlvDefaultTextRenderer |
( |
IlvDisplay * |
display | ) |
|
Initializes a new instance of this text renderer.
- Parameters
-
display | The display used to create the graphic object. |
◆ IlvDefaultTextRenderer() [2/2]
Initializes a new instance of the text renderer as a copy of another one.
- Parameters
-
source | The object to be copied. |
◆ getPalette()
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()
.
◆ getTextColor()
IlvColor* IlvDefaultTextRenderer::getTextColor |
( |
| ) |
const |
Returns the color of labels produced by this renderer.
- Returns
0
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.
◆ getTextFont()
IlvFont* IlvDefaultTextRenderer::getTextFont |
( |
| ) |
const |
Returns the font of the generated graphic object.
- Returns
0
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.
◆ makeGraphic()
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 0 ), 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 0
if a severe error occurred.
Implements IlvFeatureRenderer.
◆ setPalette()
void IlvDefaultTextRenderer::setPalette |
( |
IlvPalette * |
palette | ) |
|
Sets the palette used to create the graphic object.
- Parameters
-
◆ setTextColor() [1/2]
IlvMapsError IlvDefaultTextRenderer::setTextColor |
( |
const char * |
colorName | ) |
|
Sets the color of labels produced by this renderer.
- Parameters
-
colorName | The name of the color. |
- 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.
◆ setTextColor() [2/2]
void IlvDefaultTextRenderer::setTextColor |
( |
IlvColor * |
color | ) |
|
Sets the color of labels produced by this renderer.
- Note
- This function is a convenience function that can be used instead of
setPalette()
.
- Parameters
-
color | The color to be set. |
◆ setTextFont() [1/2]
IlvMapsError IlvDefaultTextRenderer::setTextFont |
( |
const char * |
fontName | ) |
|
Sets the font of the generated graphic object.
- 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.
◆ setTextFont() [2/2]
void IlvDefaultTextRenderer::setTextFont |
( |
IlvFont * |
font | ) |
|
Sets the font of the generated graphic objects.
- Note
- This function is a convenience function that can be used instead of
setPalette()
.
- Parameters
-
font | The font of the generated graphic object. |