libosmscout 1.1.1
Loading...
Searching...
No Matches
osmscout::LabelPath Class Reference

#include <libosmscout-map/include/osmscoutmap/LabelPath.h>

Public Member Functions

 LabelPath (double minSegmentLength=5)
virtual ~LabelPath ()
void AddPoint (const Vertex2D &point)
double GetLength () const
Vertex2D PointAtLength (double offset) const
double AngleAtLength (double offset) const
double AngleAtLengthDeg (double offset) const
bool TestAngleVariance (double startOffset, double endOffset, double maximumAngle) const

Detailed Description

Helper for rendering labels following some path.

TODO: implement Bezier curves ?

Constructor & Destructor Documentation

◆ LabelPath()

osmscout::LabelPath::LabelPath ( double minSegmentLength = 5)
explicit

◆ ~LabelPath()

virtual osmscout::LabelPath::~LabelPath ( )
virtual

Member Function Documentation

◆ AddPoint()

void osmscout::LabelPath::AddPoint ( const Vertex2D & point)

◆ AngleAtLength()

double osmscout::LabelPath::AngleAtLength ( double offset) const

◆ AngleAtLengthDeg()

double osmscout::LabelPath::AngleAtLengthDeg ( double offset) const

◆ GetLength()

double osmscout::LabelPath::GetLength ( ) const
inline

◆ PointAtLength()

Vertex2D osmscout::LabelPath::PointAtLength ( double offset) const

◆ TestAngleVariance()

bool osmscout::LabelPath::TestAngleVariance ( double startOffset,
double endOffset,
double maximumAngle ) const

Test how squiggly is path in given offsets. It return true if angle between first path segment (on startOffset) and any following (until endOffset) is lesser than required maximum.

Parameters
startOffset
endOffset
maximumAnglein radians
Returns
true if angle between first and following segments (between given offsets) is lesser than maximumAngle

The documentation for this class was generated from the following file: