CartoType API
Public Member Functions | Public Attributes
CartoType::CMapStyle Class Reference

#include <cartotype_style_sheet.h>

List of all members.

Public Member Functions

CT_IMPORT const MStringString (TResult &aError, const MString &aString, const MString *aId=NULL)
CT_IMPORT const MStringFindStringById (const MString &aId) const
bool GetLabel (const TLabelStyle &aLabelStyle, const MString &aDefault, const CMapObject &aObject, TText &aLabel) const
int32 LayerGroupEnd (int32 aIndex)

Public Attributes

int32 iScale
TPaint iBackground
CString iLabelFormat
CPointerArray< CLayerStyleiLayerStyle
CPointerArray< CIconiIcon
CPointerArray< CIconArrayiIconArray
CPointerArray< CSymboliSymbol
CPointerArray< CPaintServeriPaintServer
CPointerArray< CDashArrayiDashArray
CPointerArray< CStringAttribiString
CPointerArray< TLabelStyleiLabelStyle
CPointerArray< THighlightStyleiHighlightStyle
CArray< TProjectionForScaleiProjectionForScale
uint32 iRoadFlagMask
int32 iMinScale
int32 iMaxScale

Detailed Description

A compiled style for a map at a particular scale.


Member Function Documentation

CT_EXPORT const MString * CMapStyle::FindStringById ( const MString aId) const

Find a named string in the string table. Return the value, or NULL if the string was not found.

bool CartoType::CMapStyle::GetLabel ( const TLabelStyle aLabelStyle,
const MString aDefault,
const CMapObject aObject,
TText aLabel 
) const [inline]

Get the label for aObject. Return true if a non-empty label is found.

int32 CartoType::CMapStyle::LayerGroupEnd ( int32  aIndex) [inline]

Return the index of the end of a group of layers that must be drawn together.

CT_EXPORT const MString * CMapStyle::String ( TResult aError,
const MString aString,
const MString aId = NULL 
)

Add a string value to the string table, with an optional ID, and return a pointer to the value.


Member Data Documentation

The background to be drawn before drawing the rest of the map.

Dash arrays used by this style.

Highlight styles used by this style. Use a pointer array, not an array of actual objects, so that pointers remain the same when the array grows.

Icons used by this style.

Arrays of extra icons used by this style.

The default format for labels: empty if the standard name is to be used. For example, to force the English name to be chosen if it is available use "name:en".

In its simplest form the format can be a list of name attributes separated by semi-colons. If so, attributes are looked up one by one and the first matching one is found. The empty string matches the default name. Thus to search for the English name followed by the Russian name and then the default name, use "name:en;name:ru;" - note the trailing semi-colon.

Formally, a label format consists of a series of sections separated by + signs (indicating concatenation).

Each section is made from label paths (attribute names separated by semicolons), pieces of text enclosed in single or double quotes, and optional sets of font style commands enclosed in curly brackets.

For example, to create a label consisting of the English name followed by the Greek name in parentheses and italicized, use this spec:

name:en+{font-style:italic}" ("name:gr")"

Sections are discarded if no actual label text is found, or if the label text has the same value as the previous label. Therefore, in the example, the parentheses never appear with nothing between them if there is no Greek name.

The empty font style {} selects the standard font.

Extra label styles used by this style. Use a pointer array, not an array of actual objects, so that pointers remain the same when the array grows.

The styles for the layers, in drawing order.

The maximum scale denominator for which this style is valid.

The minimum scale denominator for which this style is valid.

Paint servers used by this style.

Projections to be used at given ranges of scales, unless the data has already been projected. Outside these ranges the default projection, UTM, is used.

This mask determines which parts of the road type are used when the layer is not a road. A layer is a road if it is called "road" or if the attribute "road" is true.

The default is for the level, bridge flag, tunnel flag and ramp flag to be used, so that non-road types like railways can have levels and be bridges, tunnels or ramps. The mask can be overridden by individual layer styles.

Scale that this compiled style applies to.

Named strings used by this style.

Symbols used by this style.


The documentation for this class was generated from the following files: