CartoType C++ API 8.8-7-gb35e4dc71
for Windows, Linux, Qt and other platforms supporting C++ development
|
#include <cartotype_graphics_context.h>
Public Attributes | |
int32_t | MaxWidth = INT32_MAX |
const CFlatPath * | FlatPath = nullptr |
double | PathStart = 0 |
double | MaxTurnSine = 0.5 |
TextBaseline | Baseline = TextBaseline::Alphabetic |
double | BaselineOffset = 0 |
double | LetterSpacing = 0 |
double | WordSpacing = 0 |
double | MaxCopyFitExpansion = 4 |
size_t | Fonts = 0 |
const CartoTypeCore::Font * | Font = nullptr |
bool | TraversePathBackwards: 1 |
bool | CopyFit: 1 |
Parameters to control the way text is drawn or measured.
TextBaseline CartoTypeCore::TextParam::Baseline = TextBaseline::Alphabetic |
The type of the baseline used to align the text.
double CartoTypeCore::TextParam::BaselineOffset = 0 |
The baseline offset in pixels. This value is added to the baseline's y coordinate. It can be used to shift the text away from the path it is drawn along, for example when drawing a road label beside the road instead of along the road.
bool CartoTypeCore::TextParam::CopyFit |
If drawing text on a path, stretch it out to fit the path by adding letter spacing and word spacing.
const CFlatPath* CartoTypeCore::TextParam::FlatPath = nullptr |
If iFlatPath is non-null the text is drawn along the path, which is relative to the origin passed to DrawText.
const CartoTypeCore::Font* CartoTypeCore::TextParam::Font = nullptr |
A pointer to an array of fonts, to be selected using special characters embedded in the text. This pointer must be non-null if iFonts is greater than zero.
size_t CartoTypeCore::TextParam::Fonts = 0 |
double CartoTypeCore::TextParam::LetterSpacing = 0 |
Letter spacing in pixels. This value is added to all character advances.
double CartoTypeCore::TextParam::MaxCopyFitExpansion = 4 |
The greatest factor by which a string can be expanded when copy-fitting by adding letter spacing and word spacing. The default value is 4.
double CartoTypeCore::TextParam::MaxTurnSine = 0.5 |
If drawing on a path, the sine of the maximum tolerated angle between baselines of successive characters. The default is 0.5 = sin(30 degrees).
int32_t CartoTypeCore::TextParam::MaxWidth = INT32_MAX |
If the text cannot be fitted into iMaxWidth, measured along the baseline in pixels, it is truncated.
double CartoTypeCore::TextParam::PathStart = 0 |
If drawing along a path, the distance along the path to start at.
bool CartoTypeCore::TextParam::TraversePathBackwards |
If drawing text on a path, traverse the path backwards.
double CartoTypeCore::TextParam::WordSpacing = 0 |
Word spacing in pixels. This value is added to the advance of word spaces.