Views
Maps Package API Reference Guide
Product Documentation:
Views Documentation Home
List of all members | Public Member Functions | Static Public Member Functions
IlvIconPointRenderer Class Reference

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

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

Inheritance diagram for IlvIconPointRenderer:
IlvFeatureRenderer

Public Member Functions

 IlvIconPointRenderer (const IlvIconPointRenderer &source)
 Initializes a new IlvIconPointRenderer by copying an existing one. More...
 
 IlvIconPointRenderer (IlvDisplay *display)
 Initializes a new IlvIconPointRenderer instance. More...
 
IlvBitmapgetBitmap () const
 Returns the bitmap used by the renderer. More...
 
virtual IlvGraphicmakeGraphic (const IlvMapFeature &feature, const IlvMapInfo &targetMapInfo, IlvMapsError &status) const
 Translates an IlvMapFeature into a graphic object. More...
 
void setBitmap (IlvBitmap *bitmap)
 Sets the bitmap used by this renderer. More...
 
IlvMapsError setBitmapFileName (const char *fileName)
 Sets the bitmap used by this renderer by specifying a file name. More...
 
- Public Member Functions inherited from IlvFeatureRenderer
virtual IlvFeatureRenderercopy () const =0
 Copies the object. More...
 
IlvDisplaygetDisplay () const
 Returns the renderer display. More...
 
IlBoolean isPersistent () const
 Checks if the renderer can be saved. More...
 
void save (IlvOutputFile &file) const
 Saves the object to an IlvOutputFile. More...
 
virtual void write (IlvOutputFile &file) const =0
 Writes the renderer to an IlvOutputStream. More...
 

Static Public Member Functions

static IlvBitmapGetDefaultBitmap (IlvDisplay *display)
 Returns the default bitmap used by the renderer if no bitmap has been specified. More...
 
- Static Public Member Functions inherited from IlvFeatureRenderer
static IlvFeatureRendererLoad (IlvInputFile &file)
 Loads a renderer from an IlvInputFile. More...
 

Additional Inherited Members

- Protected Member Functions inherited from IlvFeatureRenderer
 IlvFeatureRenderer (IlvDisplay *display, IlBoolean persistent=IlTrue)
 Constructor. More...
 

Detailed Description

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

Library: ilvmaps

Constructor & Destructor Documentation

◆ IlvIconPointRenderer() [1/2]

IlvIconPointRenderer::IlvIconPointRenderer ( IlvDisplay display)

Initializes a new IlvIconPointRenderer instance.

Parameters
displayThe display used to create the graphic objects.

◆ IlvIconPointRenderer() [2/2]

IlvIconPointRenderer::IlvIconPointRenderer ( const IlvIconPointRenderer source)

Initializes a new IlvIconPointRenderer by copying an existing one.

Parameters
sourceThe object to be copied.

Member Function Documentation

◆ getBitmap()

IlvBitmap* IlvIconPointRenderer::getBitmap ( ) const

Returns the bitmap used by the renderer.

Returns
An IlvBitmap object that should not be deleted. However, it can be locked if an other object has to use it.
See also
IlvResource::lock(), IlvResource::unLock().

◆ GetDefaultBitmap()

static IlvBitmap* IlvIconPointRenderer::GetDefaultBitmap ( IlvDisplay display)
static

Returns the default bitmap used by the renderer if no bitmap has been specified.

Parameters
displayThe display instance for which the bitmap is created.
Returns
An IlvBitmap object that should not be deleted. However, it can be locked if an other object has to use it.
See also
IlvResource::lock(), IlvResource::unLock().

◆ makeGraphic()

virtual IlvGraphic* IlvIconPointRenderer::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 thatis 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
featureThe map feature to be translated.
targetMapInfoThis 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)
statusIs 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
The created IlvGraphic or a 0 if a severe error occurred.

Implements IlvFeatureRenderer.

◆ setBitmap()

void IlvIconPointRenderer::setBitmap ( IlvBitmap bitmap)

Sets the bitmap used by this renderer.

Parameters
bitmapThe bitmap to be set.

◆ setBitmapFileName()

IlvMapsError IlvIconPointRenderer::setBitmapFileName ( const char *  fileName)

Sets the bitmap used by this renderer by specifying a file name.

Parameters
fileNameThe name of the file containing the bitmap.
Returns
An IlvMapError code if fileName is not a valid bitmap file name.