|
CartoType API
|
#include <cartotype_symbol.h>
Public Types | |
| enum | { ERepeatedSymbolIsOneWayArrow = 1, ERepeatedSymbolIsLabel = 2, ERepeatedSymbolCanOverlapEdge = 4 } |
Public Member Functions | |
| CSymbol (TFixed aGap) | |
| virtual TResult | Draw (const TTransform &aTransform)=0 |
| virtual TResult | OnStartDrawing ()=0 |
| virtual TResult | OnEndDrawing ()=0 |
| virtual TFixed | LeftEdge () const =0 |
| virtual TFixed | MaxDistanceFromOrigin () const =0 |
| TFixed | Gap () const |
| CT_IMPORT TResult | DrawRepeated (CGraphicsContext &aGc, CLabelGraphicsContext &aLabelGc, const MPath &aPath, bool aFractionalPixels, bool aReflect, uint32 aRepeatedSymbolFlags) |
| CT_IMPORT TResult | StartDrawing (CGraphicsContext &aGc, CLabelGraphicsContext &aLabelGc, uint32 aRepeatedSymbolFlags) |
| CT_IMPORT TResult | EndDrawing () |
Protected Attributes | |
| CGraphicsContext * | iGc |
| CLabelGraphicsContext * | iLabelGc |
| bool | iIsLabel |
| bool | iCanOverlapEdge |
An abstract base class for a small object drawn on a map, possibly repeated along a path. A good example is an arrow used to show the direction of a one-way street.
| anonymous enum |
Bit values supplied to DrawRepeated and StartDrawing.
| virtual TResult CartoType::CSymbol::Draw | ( | const TTransform & | aTransform | ) | [pure 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.
Implemented in CartoType::CSvgSymbol, and CartoType::CPathSymbol.
| CT_EXPORT TResult CSymbol::DrawRepeated | ( | CGraphicsContext & | aGc, |
| CLabelGraphicsContext & | aLabelGc, | ||
| const MPath & | aPath, | ||
| bool | aFractionalPixels, | ||
| bool | aReflect, | ||
| uint32 | aRepeatedSymbolFlags | ||
| ) |
Draw one or more symbols along the specified path, which is in fractional pixels if aFractionalPixels is true. If aReflect is true, rotate the symbol by 180 degrees before drawing it.
| TFixed CartoType::CSymbol::Gap | ( | ) | const [inline] |
Return the distance in pixels between successive symbols. Used for repeated symbols.
| virtual TFixed CartoType::CSymbol::LeftEdge | ( | ) | const [pure virtual] |
Return the left edge of the symbol so that it can be aligned with the start of the path.
Implemented in CartoType::CSvgSymbol, and CartoType::CPathSymbol.
| virtual TFixed CartoType::CSymbol::MaxDistanceFromOrigin | ( | ) | const [pure 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.
Implemented in CartoType::CSvgSymbol, and CartoType::CPathSymbol.
| virtual TResult CartoType::CSymbol::OnEndDrawing | ( | ) | [pure virtual] |
Called at the end of a series of drawing operations to indicate that any GC pointers and cached data can be discarded.
Implemented in CartoType::CSvgSymbol, and CartoType::CPathSymbol.
| virtual TResult CartoType::CSymbol::OnStartDrawing | ( | ) | [pure virtual] |
Called at the start of a series of drawing operations to allow graphics state, etc., to be set.
Implemented in CartoType::CSvgSymbol, and CartoType::CPathSymbol.
1.7.5.1