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

This rendering style stores style parameters to draw lines. More...

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

Inheritance diagram for IlvMapLineRenderingStyle:
IlvMapRenderingStyle

Public Member Functions

 IlvMapLineRenderingStyle (const IlvMapLineRenderingStyle &source)
 Initializes a new instance of the renderer as a copy of another one. More...
 
 IlvMapLineRenderingStyle (IlvDisplay *display)
 Initializes a new instance of the renderer. More...
 
IlvColorgetForeground () const
 Returns the foreground used to create the lines. More...
 
IlvLineStylegetLineStyle () const
 Returns the style used by the renderer to draw the lines. More...
 
IlUShort getLineWidth () const
 Returns the line width used for the lines. More...
 
IlvPalettegetPalette () const
 Returns the palette used to create the graphic objects. More...
 
IlBoolean isStyleAndWidthAllowed () const
 Indicates if dashed style can be used for lines of width greater than 1. More...
 
IlvMapsError setForeground (const char *colorName)
 Sets the foreground of the lines by specifying a color name. More...
 
void setForeground (IlvColor *color)
 Sets the foreground of the lines. More...
 
IlvMapsError setLineStyle (const char *lineStyleName)
 Sets the array representing the lengths of the dash segments of the lines. More...
 
void setLineStyle (IlvLineStyle *lineStyle)
 Sets the array representing the lengths of the dash segments of the lines. More...
 
void setLineWidth (IlUShort lineWidth)
 Sets the line width of the lines. More...
 
void setPalette (IlvPalette *palette)
 Sets the palette used to create the graphic objects. More...
 
void setStyleAndWidthAllowed (IlBoolean allow)
 Specifies if dashed style can be used for lines of width greater than 1. More...
 
- Public Member Functions inherited from IlvMapRenderingStyle
virtual IlvMapRenderingStylecopy () const =0
 Copies the object. More...
 
IlvDisplaygetDisplay () const
 Returns the display that is used to create the graphic settings. More...
 
void lock ()
 Locks the object and prevents it from being deleted. More...
 
void save (IlvOutputFile &file) const
 Saves the object to an output file. More...
 
void unLock ()
 Unlocks the object. More...
 

Protected Member Functions

virtual ~IlvMapLineRenderingStyle ()
 Destructor. More...
 
- Protected Member Functions inherited from IlvMapRenderingStyle
 IlvMapRenderingStyle (const IlvMapRenderingStyle &source)
 Initializes a new instance of the renderer style as a copy of another one. More...
 
 IlvMapRenderingStyle (IlvDisplay *display)
 Initializes a new instance of this rendering style. More...
 
virtual ~IlvMapRenderingStyle ()
 Destructor. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from IlvMapRenderingStyle
static IlvMapRenderingStyleLoad (IlvInputFile &file)
 Loads a rendering style from an IlvInputFile. More...
 

Detailed Description

This rendering style stores style parameters to draw lines.

Library: ilvmaps

Constructor & Destructor Documentation

◆ IlvMapLineRenderingStyle() [1/2]

IlvMapLineRenderingStyle::IlvMapLineRenderingStyle ( IlvDisplay display)

Initializes a new instance of the renderer.

Parameters
displayThe display used to create the graphic settings.

◆ IlvMapLineRenderingStyle() [2/2]

IlvMapLineRenderingStyle::IlvMapLineRenderingStyle ( const IlvMapLineRenderingStyle source)

Initializes a new instance of the renderer as a copy of another one.

Parameters
sourceThe object to be copied.

◆ ~IlvMapLineRenderingStyle()

virtual IlvMapLineRenderingStyle::~IlvMapLineRenderingStyle ( )
protectedvirtual

Destructor.

The destructor of this class is protected, because instances of IlvMapRenderingStyle are potentially shared by several objects.

See also
IlvMapRenderingStyle::lock(), IlvMapRenderingStyle::unLock().

Member Function Documentation

◆ getForeground()

IlvColor* IlvMapLineRenderingStyle::getForeground ( ) const

Returns the foreground used to create the lines.

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 another object has to use it.

◆ getLineStyle()

IlvLineStyle* IlvMapLineRenderingStyle::getLineStyle ( ) const

Returns the style used by the renderer to draw the lines.

Returns
0 if no line style is specified or an IlvLineStyle that should not be modified, because it can potentially be shared with other objects. However, it is possible to lock it if another object has to use it.

◆ getLineWidth()

IlUShort IlvMapLineRenderingStyle::getLineWidth ( ) const

Returns the line width used for the lines.

Returns
The line width.

◆ getPalette()

IlvPalette* IlvMapLineRenderingStyle::getPalette ( ) const

Returns the palette used to create the graphic objects.

Returns
0 if no specific setting is set, or an IlvPalette that should not be modified, because it can potentially be shared by other objects. However, it is possible to lock it if another object has to use it.
See also
IlvResource::lock().

◆ isStyleAndWidthAllowed()

IlBoolean IlvMapLineRenderingStyle::isStyleAndWidthAllowed ( ) const

Indicates if dashed style can be used for lines of width greater than 1.

Returns
IlTrue if a line style can be used for lines of width greater than 1.

◆ setForeground() [1/2]

IlvMapsError IlvMapLineRenderingStyle::setForeground ( const char *  colorName)

Sets the foreground of the lines by specifying a color name.

Note
This function is a convenience function that can be used instead of setPalette().
Parameters
colorNameThe name of the color.
Returns
IlvMapsError::NoError() or IlvMaps::IllegalArgument() if the color name cannot be translated into a color.

◆ setForeground() [2/2]

void IlvMapLineRenderingStyle::setForeground ( IlvColor color)

Sets the foreground of the lines.

This is a convenience function that can be used instead of setPalette().

Parameters
colorThe color used as foreground.

◆ setLineStyle() [1/2]

IlvMapsError IlvMapLineRenderingStyle::setLineStyle ( const char *  lineStyleName)

Sets the array representing the lengths of the dash segments of the lines.

This function sets the line width to 1 if the line style is not plain.

Note
This function is a convenience function that can be used instead of setPalette().
Parameters
lineStyleNameThe name of a style.
Returns
IlvMapsError::NoError() or IlvMaps::IllegalArgument() if the line style name cannot be translated into an IlvLineStyle.

◆ setLineStyle() [2/2]

void IlvMapLineRenderingStyle::setLineStyle ( IlvLineStyle lineStyle)

Sets the array representing the lengths of the dash segments of the lines.

This function sets the line width to 1 if the line style is not plain.

Note
This function is a convenience function that can be used instead of setPalette().
Parameters
lineStyleThe line style.

◆ setLineWidth()

void IlvMapLineRenderingStyle::setLineWidth ( IlUShort  lineWidth)

Sets the line width of the lines.

A line width higher than 1 removes the line style.

Note
This function is a convenience function that can be used instead of setPalette().
Parameters
lineWidthThe width of the line used to draw the polylines generated by this renderer.

◆ setPalette()

void IlvMapLineRenderingStyle::setPalette ( IlvPalette palette)

Sets the palette used to create the graphic objects.

This function can be used to specify a special palette instead of the palette created by the setters of this class.

Parameters
paletteThe palette.

◆ setStyleAndWidthAllowed()

void IlvMapLineRenderingStyle::setStyleAndWidthAllowed ( IlBoolean  allow)

Specifies if dashed style can be used for lines of width greater than 1.

Warning
If this function is called with allow set to IlTrue, the produced graphic objects can have a different aspect on Unix, Windows NT or Windows 98.
Parameters
allowIf IlTrue, line style can be used for lines of width greater than 1.