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) | |
Initializes a new IlvMapDefaultNeedle instance. More... | |
const IlvColor * | getBackground () const |
Returns the background color. More... | |
const IlvColor * | getForeground () const |
Returns the foreground color. More... | |
IlvMapDefaultNeedleStyle | getStyle () const |
Retrieves the style of the needle. More... | |
void | setBackground (IlvColor *color) |
Sets the background color. More... | |
void | setForeground (IlvColor *color) |
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 |
||
) |
Initializes a new IlvMapDefaultNeedle
instance.
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 |
Returns the background color.
This color should not be modified.
const IlvColor* IlvMapDefaultNeedle::getForeground | ( | ) | const |
Returns the foreground color.
This color should not be modified.
IlvMapDefaultNeedleStyle IlvMapDefaultNeedle::getStyle | ( | ) | const |
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.
color | The new background color. |
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.
color | The new foreground color. |
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. |