Rogue Wave Views Maps Package API Reference Guide |
Rogue Wave Views Documentation Home |
A default needle used by the IlvMapCompass
class.
More...
#include <ilviews/maps/gui/compass.h>
Public Member Functions | |
IlvMapDefaultNeedle (IlvDisplay *display, IlvRect &rect, IlvMapDefaultNeedleStyle style, IlvPalette *palette=0) | |
Constructor. More... | |
const IlvColor * | getBackground () |
Returns the background color. More... | |
const IlvColor * | getForeground () |
Returns the foreground color. More... | |
IlvMapDefaultNeedleStyle | getStyle () |
Retrieves the style of the needle. More... | |
void | setBackground (IlvColor *col) |
Sets the background color. More... | |
void | setForeground (IlvColor *col) |
Sets the foreground color. More... | |
void | setStyle (IlvMapDefaultNeedleStyle style, IlBoolean redraw=IlTrue) |
Sets the style of the needle. More... | |
A default needle used by the IlvMapCompass
class.
Library: ilvmaps
This class implements a default needle which is used by the IlvMapCompass
if the user does not provide any. Four styles of needles are predefined:
IlvMapSimpleNeedle
A line terminated by an arrow is drawn. IlvMapCompassNeedle
A classic compass needle. IlvMapCrossNeedle
A simple cross with an arrow. IlvMapCompassRoseNeedle
A rose with an 'N' letter indicating the north Two colors can be specified to draw the needle: a foreground color which is used to draw lined part of the needle, and a background color used to fill filled parts of the needle.
IlvMapDefaultNeedle::IlvMapDefaultNeedle | ( | IlvDisplay * | display, |
IlvRect & | rect, | ||
IlvMapDefaultNeedleStyle | style, | ||
IlvPalette * | palette = 0 |
||
) |
Constructor.
Construct a IlvMapDefaultNeedle
object.
display | The IlvDisplay . |
rect | The initial size and position of the object. |
style | The style of the needle. |
palette | The palette used to draw the needle. |
const IlvColor* IlvMapDefaultNeedle::getBackground | ( | ) |
const IlvColor* IlvMapDefaultNeedle::getForeground | ( | ) |
IlvMapDefaultNeedleStyle IlvMapDefaultNeedle::getStyle | ( | ) |
Retrieves the style of the needle.
|
virtual |
Sets the background color.
Sets the color is used to draw lined part of the needle. The color is locked by the object. The previous background color (if any) is unlocked.
col | The new background IlvColor . |
Reimplemented from IlvSimpleGraphic.
|
virtual |
Sets the foreground color.
Sets the color used to draw lined part of the needle. The color is locked by the object. The previous foreground color (if any) is unlocked.
col | The new foreground IlvColor . |
Reimplemented from IlvSimpleGraphic.
void IlvMapDefaultNeedle::setStyle | ( | IlvMapDefaultNeedleStyle | style, |
IlBoolean | redraw = IlTrue |
||
) |
Sets the style of the needle.
style | The new style. |
redraw | Specifies if a redraw is to be immediately performed. |
© Copyright 2016, 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.