104 std::size_t maximumPointCandidates()
const;
109 std::size_t maximumLineCandidates()
const;
114 std::size_t maximumPolygonCandidates()
const;
119 std::vector<std::unique_ptr<LabelPosition> > createCandidates(
Pal *
pal );
129 std::size_t createCandidatesAroundPoint(
double x,
double y, std::vector<std::unique_ptr<LabelPosition> > &lPos,
double angle );
139 std::size_t createCandidatesOverPoint(
double x,
double y, std::vector<std::unique_ptr<LabelPosition> > &lPos,
double angle );
149 std::size_t createCandidateCenteredOverPoint(
double x,
double y, std::vector<std::unique_ptr<LabelPosition> > &lPos,
double angle );
157 std::unique_ptr< LabelPosition > createCandidatePointOnSurface(
PointSet *mapShape );
167 std::size_t createCandidatesAtOrderedPositionsOverPoint(
double x,
double y, std::vector<std::unique_ptr<LabelPosition> > &lPos,
double angle );
177 std::size_t createCandidatesAlongLine( std::vector<std::unique_ptr<LabelPosition> > &lPos,
PointSet *mapShape,
bool allowOverrun,
Pal *
pal );
186 std::size_t createHorizontalCandidatesAlongLine( std::vector<std::unique_ptr<LabelPosition> > &lPos,
PointSet *mapShape,
Pal *
pal );
196 std::size_t createCandidatesAlongLineNearStraightSegments( std::vector<std::unique_ptr<LabelPosition> > &lPos,
PointSet *mapShape,
Pal *
pal );
208 std::size_t createCandidatesAlongLineNearMidpoint( std::vector<std::unique_ptr<LabelPosition> > &lPos,
PointSet *mapShape,
double initialCost = 0.0,
Pal *
pal =
nullptr );
221 std::unique_ptr< LabelPosition > curvedPlacementAtOffset(
PointSet *mapShape,
const std::vector<double> &pathDistances,
233 std::size_t createCurvedCandidatesAlongLine( std::vector<std::unique_ptr<LabelPosition> > &lPos,
PointSet *mapShape,
bool allowOverrun,
Pal *
pal );
242 std::size_t createCandidatesForPolygon( std::vector<std::unique_ptr<LabelPosition> > &lPos,
PointSet *mapShape,
Pal *
pal );
250 std::size_t createCandidatesOutsidePolygon( std::vector<std::unique_ptr<LabelPosition> > &lPos,
Pal *
pal );
258 bool hasSameLabelFeatureAs(
FeaturePart *part )
const;
318 void addSizePenalty( std::vector<std::unique_ptr<LabelPosition> > &lPos,
double bbx[4],
double bby[4] )
const;
324 double calculatePriority()
const;
327 bool onlyShowUprightLabels()
const;
333 int totalRepeats()
const;
339 void setTotalRepeats(
int repeats );
353 int mTotalRepeats = 0;
355 mutable std::size_t mCachedMaxLineCandidates = 0;
356 mutable std::size_t mCachedMaxPolygonCandidates = 0;
LabelQuadrantPosition
Label quadrant positions.
QFlags< CurvedTextFlag > CurvedTextFlags
Flags controlling behavior of curved text generation.
Describes a feature that should be used within the labeling engine.
Contains settings related to how the label engine treats features as obstacles.
LabelLineDirection
Controls behavior of curved text with respect to line directions.
Represents a part of a label feature.
FeaturePart(QgsLabelFeature *lf, const GEOSGeometry *geom)
Creates a new generic feature.
bool hasFixedRotation() const
Returns true if the feature's label has a fixed rotation.
double getLabelHeight(double angle=0.0) const
Returns the height of the label, optionally taking an angle (in radians) into account.
QList< FeaturePart * > mHoles
double getLabelDistance() const
Returns the distance from the anchor point to the label.
bool hasFixedPosition() const
Returns true if the feature's label has a fixed position.
double fixedAngle() const
Returns the fixed angle for the feature's label.
double repeatDistance() const
Returns the distance between repeating labels for this feature.
int getNumSelfObstacles() const
Gets number of holes (inner rings) - they are considered as obstacles.
double getLabelWidth(double angle=0.0) const
Returns the width of the label, optionally taking an angle (in radians) into account.
const QgsLabelObstacleSettings & obstacleSettings() const
Returns the feature's obstacle settings.
bool alwaysShow() const
Returns true if the feature's label should always been shown, even when it collides with other labels...
QgsLabelFeature * feature()
Returns the parent feature.
PathOffset
Path offset variances used in curved placement.
FeaturePart * getSelfObstacle(int i)
Gets hole (inner ring) - considered as obstacle.
void extractCoords(const GEOSGeometry *geom)
read coordinates from a GEOS geom
A set of features which influence the labeling process.
The underlying raw pal geometry class.
qint64 QgsFeatureId
64 bit feature ids negative numbers are used for uncommitted/newly added features
struct GEOSGeom_t GEOSGeometry