rwlogo
Rogue Wave Views 5.5.1

Rogue Wave Views
Maps Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IlvDefaultPointRenderer Class Reference

This renderer translates a map feature whose geometry is an IlvMapPoint into an IlvMarker. More...

Inheritance diagram for IlvDefaultPointRenderer:
IlvFeatureRenderer

List of all members.

Public Member Functions

 IlvDefaultPointRenderer (const IlvDefaultPointRenderer &source)
 Creates an IlvDefaultPointRenderer by copying an existing one.
 IlvDefaultPointRenderer (IlvDisplay *display)
 Creates an instance of the renderer.
virtual IlvFeatureRenderercopy () const
 Copies the object.
IlvColorgetForeground () const
 Returns the foreground color used to draw the marker.
IlUShort getLineWidth () const
 Returns the line width.
IlUShort getMarkerSize () const
 Returns the size of marker produced by this renderer.
IlvMarkerType getMarkerType () const
 Returns the marker type.
IlvPalettegetPalette () const
 Returns the palette used to create the graphic objects.
IlvPatterngetPattern () const
 Returns the pattern used for the marker.
virtual IlvGraphicmakeGraphic (const IlvMapFeature &feature, const IlvMapInfo &targetMapInfo, IlvMapsError &status) const
 Translates an IlvMapFeature into a graphic object.
IlvMapsError setForeground (const char *colorName)
 Sets the foreground color of the marker.
void setForeground (IlvColor *color)
 Sets the foreground color of the marker.
void setLineWidth (IlUShort lineWidth)
 Sets the line width for the marker lines.
void setMarkerSize (IlUShort markerSize)
 Sets the size of the marker produced by this renderer.
void setMarkerType (IlvMarkerType markerType)
 Sets the marker type used by this renderer.
void setPalette (IlvPalette *palette)
 Sets the palette used to create the graphic objects.
IlvMapsError setPattern (const char *fileName)
 Sets a pattern for the marker by specifying a file name.
void setPattern (IlvPattern *pattern)
 Sets a pattern for the marker.
virtual void write (IlvOutputFile &) const
 Writes the renderer to an IlvOutputStream.

Detailed Description

This renderer translates a map feature whose geometry is an IlvMapPoint into an IlvMarker.

Library: ilvmaps


Constructor & Destructor Documentation

IlvDefaultPointRenderer::IlvDefaultPointRenderer ( IlvDisplay display  ) 

Creates an instance of the renderer.

Parameters:
display The display.
IlvDefaultPointRenderer::IlvDefaultPointRenderer ( const IlvDefaultPointRenderer source  ) 

Creates an IlvDefaultPointRenderer by copying an existing one.

Parameters:
source The object to be copied.

Member Function Documentation

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

Copies the object.

Returns:
A copy of this IlvFeatureRenderer.

Implements IlvFeatureRenderer.

IlvColor* IlvDefaultPointRenderer::getForeground (  )  const

Returns the foreground color used to draw the marker.

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.
IlUShort IlvDefaultPointRenderer::getLineWidth (  )  const

Returns the line width.

Returns:
The line width.
IlUShort IlvDefaultPointRenderer::getMarkerSize (  )  const

Returns the size of marker produced by this renderer.

Returns:
The marker size.
IlvMarkerType IlvDefaultPointRenderer::getMarkerType (  )  const

Returns the marker type.

Returns:
The marker type.
IlvPalette* IlvDefaultPointRenderer::getPalette (  )  const

Returns the palette used to create the graphic objects.

Returns:
An IlvPalette object 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()
IlvPattern* IlvDefaultPointRenderer::getPattern (  )  const

Returns the pattern used for the marker.

Returns:
A null pointer if no pattern is specified , or an IlvPattern 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* IlvDefaultPointRenderer::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.

IlvMapsError IlvDefaultPointRenderer::setForeground ( const char *  colorName  ) 

Sets the foreground color of the marker.

It can be a predefined color or the string can have the syntax "#RRGGBB" in hexadecimal. The foreground color is used if there is no pattern or if there is a non-color pattern.

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

Sets the foreground color of the marker.

The foreground color is used if there is no pattern or if there is a non-color pattern.

Warning:
[note] This function is a convenience function that can be used instead of setPalette.
Parameters:
color The foreground color used to draw the marker.
void IlvDefaultPointRenderer::setLineWidth ( IlUShort  lineWidth  ) 

Sets the line width for the marker lines.

If the value is greater than 0, then the lines will be drawn using the fill pattern if any.

Warning:
[note] This function is a convenience function that can be used instead of setPalette.
Parameters:
lineWidth The new line width.
void IlvDefaultPointRenderer::setMarkerSize ( IlUShort  markerSize  ) 

Sets the size of the marker produced by this renderer.

Parameters:
markerSize The size of the marker.
void IlvDefaultPointRenderer::setMarkerType ( IlvMarkerType  markerType  ) 

Sets the marker type used by this renderer.

Parameters:
markerType The marker type.
void IlvDefaultPointRenderer::setPalette ( IlvPalette palette  ) 

Sets the palette used to create the graphic objects.

Parameters:
palette The palette to be set.
IlvMapsError IlvDefaultPointRenderer::setPattern ( const char *  fileName  ) 

Sets a pattern for the marker by specifying a file name.

The pattern is used for the marker types that fill an area (IlvMarkerFilledSquare, IlvMarkerFilledCircle, IlvMarkerFilledDiamond, IlvMarkerFilledTriangle).

Parameters:
fileName Name of the file containing the pattern.
Warning:
[note] This function is a convenience function that can be used instead of setPalette.
Returns:
MapsError::IllegalArgument() if the name supplied is not a valid bitmap file name.
void IlvDefaultPointRenderer::setPattern ( IlvPattern pattern  ) 

Sets a pattern for the marker.

The pattern is used for the marker types that fill an area (IlvMarkerFilledSquare, IlvMarkerFilledCircle, IlvMarkerFilledDiamond, IlvMarkerFilledTriangle).

Warning:
[note] This function is a convenience function that can be used instead of setPalette.
Parameters:
pattern The pattern.
virtual void IlvDefaultPointRenderer::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.


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