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

#include <cartotype_style_sheet.h>

List of all members.

Public Member Functions

CT_IMPORT CLayerStyleCopy (TResult &aError) const
CT_IMPORT void Normalise ()
CT_IMPORT const TObjectStyleObjectStyle (const CMapObject &aObject, const CMapDrawParam *aMapDrawParam, bool *aOverridden=NULL) const

Public Attributes

CString iName
TObjectStyle iDefaultStyle
CPointerArray
< CConditionalLayerStyle
iConditionalStyle
bool iDrawLabelLayer
bool iHasForcedLevels
TFixed iMaxIntersectionDistance
uint32 iRoadFlagMask
int32 iLayerGroup

Detailed Description

A style for a map layer.

There is a default style and there are zero or more conditional styles. If there are no conditional styles all objects are drawn using the default style. If conditional styles exist, for each object the conditional styles are tested in order, and the first one for which the condition is true is used for the object.


Member Function Documentation

CT_EXPORT CLayerStyle * CLayerStyle::Copy ( TResult aError) const

Create a copy of a layer style.

CT_EXPORT void CLayerStyle::Normalise ( )

Normalise the style (normally after it has been set by the style sheet) by modifying certain parameters to improve drawing. This function is not yet idempotent; it should be called only once after the style sheet has been set.

CT_EXPORT const TObjectStyle * CLayerStyle::ObjectStyle ( const CMapObject aObject,
const CMapDrawParam aMapDrawParam,
bool *  aOverridden = NULL 
) const

Determine the style for an object. If aOverridden is non-null, set it to indicate whether the style has been overridden. This allows the label drawing system to know that it cannot rely on pointer comparison to know whether to reset its fonts, because an overrider may return a pointer to the same style object after changing it.


Member Data Documentation

Styles used if there are conditions.

The style used if there are no conditions.

If true, draw any accumulated labels and icons after this layer and clear any labels and icons..

If true, there are one or more forced object levels; this is set by Normalise.

A group number allowing layers to be grouped, so that edges of line objects join together. Any number of layers can be grouped, allowing roads to be stored in separate layers for database lookup efficiency.

The maximum distance from an object, in pixels, that is affected when an object is drawn. For example, when roads are drawn, points up to half the road width are drawn to. This value is used when deciding which objects intersect a given region and therefore must be drawn.

To set this value correctly, call Normalise after setting the other parameters.

The name of the layer, as used in the style sheet.

This mask determines which parts of the road type are used by this layer.


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