Rogue Wave Views Maps Package API Reference Guide |
Rogue Wave Views Documentation Home |
A scale object that displays the scale of a view. More...
#include <ilviews/maps/gui/scale.h>
Public Member Functions | |
IlvMapScale (IlvDisplay *display, const IlvRect &rect, IlvMapScaleTextMode mode=IlvMapScaleThreeLabels, IlvGraphic *bar=0, IlvDim margin=5, IlvPalette *palette=0) | |
Constructor. More... | |
IlDouble | getFarLimit () |
Retrieves the far limit. More... | |
const IlvUnitConverter * | getFarUnitConverter () const |
Retrieves the far unit converter. More... | |
const IlvGraphic * | getGraphic () |
Retrieves the scale bar IlvGraphic . More... | |
IlvDim | getMargin () |
Retrieves the margin. More... | |
const IlvUnitConverter * | getNearUnitConverter () const |
Retrieves the near unit converter. More... | |
IlvMapScaleTextMode | getScaleTextMode () |
Retrieves the text mode. More... | |
IlvDim | getSpacing () |
Retrieves the spacing between the text and the scale bar. More... | |
void | setFarLimit (IlDouble limit) |
Sets the far limit. More... | |
void | setFarUnitConverter (IlvUnitConverter *farConv) |
Sets the far unit converter. More... | |
void | setGraphic (IlvGraphic *graphic) |
Sets a new IlvGraphic to represent the scale bar part of the scale. More... | |
void | setMargin (IlvDim margin) |
Sets the margin. More... | |
void | setNearUnitConverter (IlvUnitConverter *nearConv) |
Sets the near unit converter. More... | |
void | setScaleTextMode (IlvMapScaleTextMode mode) |
Sets the label displaying mode. More... | |
void | setSpacing (IlvDim spacing) |
Sets the spacing (in pixels) between the text and the scale bar. More... | |
void | setView (IlvView *view) |
Attaches a view to the scale. More... | |
A scale object that displays the scale of a view.
Library: ilvmaps
This component works only if the manager of the target view has an IlvMapInfo
property attached. This property defines the coordinate system of the manager and its units.
IlvMapScale::IlvMapScale | ( | IlvDisplay * | display, |
const IlvRect & | rect, | ||
IlvMapScaleTextMode | mode = IlvMapScaleThreeLabels , |
||
IlvGraphic * | bar = 0 , |
||
IlvDim | margin = 5 , |
||
IlvPalette * | palette = 0 |
||
) |
Constructor.
display | The display. |
rect | The initial size and position. |
mode | Specifies if a unique label (IlvMapScaleUniqueLabel ) or a set of labels (IlvMapScaleThreeLabels ) is to be drawn. |
bar | The IlvGraphic representing the bar. If no bar is specified, the scale will automatically create a IlvMapDefaultScaleBar . If an IlvGraphic is provided, it is then owned by the IlvMapScale . |
margin | The margin. |
palette | The IlvPalette . |
IlDouble IlvMapScale::getFarLimit | ( | ) |
Retrieves the far limit.
Returns the switch limit between a text display of the scale in a small unit (for instance, meters) and a text display in a large unit (for instance, kilometers).
const IlvUnitConverter* IlvMapScale::getFarUnitConverter | ( | ) | const |
Retrieves the far unit converter.
setFarUnitConverter()
const IlvGraphic* IlvMapScale::getGraphic | ( | ) |
Retrieves the scale bar IlvGraphic
.
IlvGraphic
. This IlvGraphic
is still owned by the scale bar. IlvDim IlvMapScale::getMargin | ( | ) |
Retrieves the margin.
const IlvUnitConverter* IlvMapScale::getNearUnitConverter | ( | ) | const |
Retrieves the near unit converter.
setNearUnitConverter()
IlvMapScaleTextMode IlvMapScale::getScaleTextMode | ( | ) |
Retrieves the text mode.
IlvDim IlvMapScale::getSpacing | ( | ) |
Retrieves the spacing between the text and the scale bar.
void IlvMapScale::setFarLimit | ( | IlDouble | limit | ) |
Sets the far limit.
The far limit is the switch limit between a text display of the scale in a small unit (for instance, meters) and a text display in a large unit (for instance, kilometers). If the map distance represented by the scale bar exceeds the limit, expressed in the small unit system, then the scale will be displayed in the large unit.
limit | The upper limit. |
void IlvMapScale::setFarUnitConverter | ( | IlvUnitConverter * | farConv | ) |
Sets the far unit converter.
The far unit converter is the converter that specifies the unit to display the length of the scale bar for small scales.
farConv | The far unit converter. The scale becomes owner of the converter. This converter must be allocated in the heap memory. |
void IlvMapScale::setGraphic | ( | IlvGraphic * | graphic | ) |
Sets a new IlvGraphic
to represent the scale bar part of the scale.
graphic | The new IlvGraphic . This graphic is now owned by the IlvMapScale . The previous IlvGraphic (if any) is deleted. |
void IlvMapScale::setMargin | ( | IlvDim | margin | ) |
Sets the margin.
margin | The minimum space between the scale bar and the border of the scale. |
void IlvMapScale::setNearUnitConverter | ( | IlvUnitConverter * | nearConv | ) |
Sets the near unit converter.
The near unit converter is the converter that specifies the unit to display the length of the scale bar for large scales.
nearConv | The near unit converter. The scale becomes owner of the converter. This converter must be allocated in the heap memory. |
void IlvMapScale::setScaleTextMode | ( | IlvMapScaleTextMode | mode | ) |
Sets the label displaying mode.
mode | The text displaying style. |
void IlvMapScale::setSpacing | ( | IlvDim | spacing | ) |
Sets the spacing (in pixels) between the text and the scale bar.
spacing | The space between the tex and the scale bar. |
© 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.