CartoType API
Public Member Functions | Static Public Member Functions
CartoType::CPathSymbol Class Reference

#include <cartotype_symbol.h>

Inheritance diagram for CartoType::CPathSymbol:
CartoType::CSymbol

List of all members.

Public Member Functions

TResult Draw (const TTransform &aTransform)
TResult OnStartDrawing ()
TResult OnEndDrawing ()
TFixed LeftEdge () const
TFixed MaxDistanceFromOrigin () const

Static Public Member Functions

static CT_IMPORT CPathSymbolNew (TResult &aError, const MString &aPath, double aUnitSize, const TPaint &aFill, const TPaint &aBorder, double aBorderWidth, double aGap)

Detailed Description

A symbol drawn by optionally filling and optionally stroking a path.


Member Function Documentation

TResult CPathSymbol::Draw ( const TTransform aTransform) [virtual]

Draw the symbol, transformed by aTransform, using iGc and iLabelGc. Do nothing if iGc is null. If iLabelGc is non-null test the symbol for overlap and draw it only if there is no overlap.

Implements CartoType::CSymbol.

TFixed CPathSymbol::LeftEdge ( ) const [virtual]

Return the left edge of the symbol so that it can be aligned with the start of the path.

Implements CartoType::CSymbol.

TFixed CPathSymbol::MaxDistanceFromOrigin ( ) const [virtual]

Return a distance in pixels guaranteed to be greater than the maximum distance of any part of the symbol from the origin. This is used in ensuring that a margin is drawn round a map so that parts of objects just off it appear, thus enabling tiles to be drawn that match along their edges.

Implements CartoType::CSymbol.

CT_EXPORT CPathSymbol * CPathSymbol::New ( TResult aError,
const MString aPath,
double  aUnitSize,
const TPaint aFill,
const TPaint aBorder,
double  aBorderWidth,
double  aGap 
) [static]

Create a path symbol: one or more closed curves drawn in a single color, with an optional border drawn in a different color. The curve is defined by a path expressed as a string aPath using SVG path syntax. The units in aPath, aBorderWidth and aGap of the size aUnitSize, which is in pixels. The symbol is filled using the paint aFill and the border is drawn of width aBorderWidth in the paint aBorder. When several symbols are drawn along a path their origins are separated by the distance aGap, measured along the path. If aGap is zero or negative, only one symbol is drawn on a path.

TResult CPathSymbol::OnEndDrawing ( ) [virtual]

Called at the end of a series of drawing operations to indicate that any GC pointers and cached data can be discarded.

Implements CartoType::CSymbol.

TResult CPathSymbol::OnStartDrawing ( ) [virtual]

Called at the start of a series of drawing operations to allow graphics state, etc., to be set.

Implements CartoType::CSymbol.


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