16 #ifndef QGSTEXTRENDERERUTILS_H
17 #define QGSTEXTRENDERERUTILS_H
20 #include "qgis_core.h"
86 static QColor readColor(
QgsVectorLayer *layer,
const QString &property,
const QColor &defaultColor = Qt::black,
bool withAlpha =
true )
SIP_SKIP;
112 int graphemeIndex = 0;
129 int upsideDownCharCount = 0;
131 bool labeledLineSegmentIsRightToLeft =
false;
133 bool flippedCharacterPlacementToGetUprightLabels =
false;
147 static CurvePlacementProperties *generateCurvedTextPlacement(
const QgsPrecalculatedTextMetrics &metrics,
const QgsLineString *line,
double offsetAlongLine, LabelLineDirection direction = RespectPainterOrientation,
double maxConcaveAngle = -1,
double maxConvexAngle = -1,
bool uprightOnly =
true )
SIP_FACTORY;
167 static CurvePlacementProperties *generateCurvedTextPlacement(
const QgsPrecalculatedTextMetrics &metrics,
const double *x,
const double *y,
int numPoints,
const std::vector< double> &pathDistances,
double offsetAlongLine, LabelLineDirection direction = RespectPainterOrientation,
double maxConcaveAngle = -1,
double maxConvexAngle = -1,
bool uprightOnly =
true )
SIP_SKIP;
172 static CurvePlacementProperties *generateCurvedTextPlacementPrivate(
const QgsPrecalculatedTextMetrics &metrics,
const double *x,
const double *y,
int numPoints,
const std::vector< double> &pathDistances,
double offsetAlongLine, LabelLineDirection direction,
double maxConcaveAngle = -1,
double maxConvexAngle = -1,
bool uprightOnly =
true,
bool isSecondAttempt =
false )
SIP_SKIP;
175 static
bool nextCharPosition(
double charWidth,
double segmentLength, const
double *x, const
double *y,
int numPoints,
int &index,
double ¤tDistanceAlongSegment,
176 double &characterStartX,
double &characterStartY,
double &characterEndX,
double &characterEndY );
178 static
void findLineCircleIntersection(
double cx,
double cy,
double radius,
179 double x1,
double y1,
double x2,
double y2,
180 double &xRes,
double &yRes );
184 #endif // QGSTEXTRENDERERUTILS_H