diff options
author | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2016-02-18 17:09:26 +0200 |
---|---|---|
committer | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2016-03-01 20:58:54 +0000 |
commit | f3fc87261c2f2db71ac9d63b680417836885da13 (patch) | |
tree | ac96b0dda727b5a262b664c121ae5579f9c0d645 /src/mbgl/text/get_anchors.cpp | |
parent | 411a562061f404fa7174222f38a1a9a13a396fd9 (diff) | |
download | qtlocation-mapboxgl-f3fc87261c2f2db71ac9d63b680417836885da13.tar.gz |
[core] Coordinate is now GeometryCoordinate
Also introduced GeometryCoordinates (vector of GeometryCoordinate
items), to better cope with GeometryCollection.
Diffstat (limited to 'src/mbgl/text/get_anchors.cpp')
-rw-r--r-- | src/mbgl/text/get_anchors.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mbgl/text/get_anchors.cpp b/src/mbgl/text/get_anchors.cpp index 7a129d692c..740ec288b3 100644 --- a/src/mbgl/text/get_anchors.cpp +++ b/src/mbgl/text/get_anchors.cpp @@ -7,7 +7,7 @@ namespace mbgl { -Anchors resample(const std::vector<Coordinate> &line, const float offset, const float spacing, +Anchors resample(const GeometryCoordinates &line, const float offset, const float spacing, const float angleWindowSize, const float maxAngle, const float labelLength, const bool continuedLine, const bool placeAtMiddle) { const float halfLabelLength = labelLength / 2.0f; @@ -23,8 +23,8 @@ Anchors resample(const std::vector<Coordinate> &line, const float offset, const int i = 0; for (auto it = line.begin(), end = line.end() - 1; it != end; it++, i++) { - const Coordinate &a = *(it); - const Coordinate &b = *(it + 1); + const GeometryCoordinate &a = *(it); + const GeometryCoordinate &b = *(it + 1); const float segmentDist = util::dist<float>(a, b); const float angle = util::angle_to(b, a); @@ -65,7 +65,7 @@ Anchors resample(const std::vector<Coordinate> &line, const float offset, const return anchors; } -Anchors getAnchors(const std::vector<Coordinate> &line, float spacing, +Anchors getAnchors(const GeometryCoordinates &line, float spacing, const float maxAngle, const float textLeft, const float textRight, const float iconLeft, const float iconRight, const float glyphSize, const float boxScale, const float overscaling) { |