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 );
 
Line string geometry type, with support for z-dimension and m-values.
Contains precalculated properties regarding text metrics for text to be renderered at a later stage.
SizeType
Methods for determining the background shape size.
ShapeType
Background shape types.
RotationType
Methods for determining the rotation of the background shape.
TextOrientation
Text orientation.
Contains placement information for a curved text layout.
QVector< QgsTextRendererUtils::CurvedGraphemePlacement > graphemePlacement
Placement information for all graphemes in text.
Contains placement information for a single grapheme in a curved text layout.
Utility functions for text rendering.
LabelLineDirection
Controls behavior of curved text with respect to line directions.
@ RespectPainterOrientation
Curved text will be placed respecting the painter orientation, and the actual line direction will be ...
ShadowPlacement
Placement positions for text shadow.
RenderUnit
Rendering size units.
Represents a vector layer which manages a vector based data sets.
double ANALYSIS_EXPORT angle(QgsPoint *p1, QgsPoint *p2, QgsPoint *p3, QgsPoint *p4)
Calculates the angle between two segments (in 2 dimension, z-values are ignored)