summaryrefslogtreecommitdiff
path: root/src/mbgl/text/get_anchors.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [core] Don't use signed int type for anchor segmentupstream/alexshalamov_signed_to_unsigned_conversionAlexander Shalamov2019-12-051-3/+3
|
* [core] Do not try to place a center anchor beyond the center of the lineThiago Marcos P. Santos2019-07-191-0/+2
| | | | | | | | | | Once the algorithm finds the center of the line, if placement is not possible, do not place the anchor. Previous code was trying to continue place the label beyond the center of the segment. Fixes #15139.
* [core] Add `symbol-placement: line-center`Chris Loer2018-07-231-12/+65
| | | | | - Remove unused/vestigial 'maxCameraDistance' - Create a single collision circle for line labels that are less than half the width of a collision circle
* [tidy] modernize-use-autoBruno de Oliveira Abinader2017-05-121-1/+1
|
* [core] Fix whitespace; no need for explicit on multi-parameter constructorsJohn Firebaugh2017-03-021-10/+23
|
* [core] Fix symbol rendering for multipointsJohn Firebaugh2016-12-201-0/+1
| | | | Ports https://github.com/mapbox/mapbox-gl-js/pull/3763 and https://github.com/mapbox/mapbox-gl-js/pull/3806.
* [core] code style cleanupsKonstantin Käfer2016-07-011-5/+5
| | | | | | | - puts function definitions in a namespace ... {} rather than using namespace ...; - remove trailing whitespace - add trailing newline - protect SQL statements from being formatted by clang-format
* [core] fix infinite loop in mbgl::resampleAnsis Brammanis2016-03-291-0/+3
| | | | fix #4416
* [core] Coordinate is now GeometryCoordinateBruno de Oliveira Abinader2016-03-011-4/+4
| | | | | Also introduced GeometryCoordinates (vector of GeometryCoordinate items), to better cope with GeometryCollection.
* [core] make sure icons fit before the ends of the lineAnsis Brammanis2016-02-091-3/+13
| | | | | | | This skips anchors if there is not enough room before the beginning or end of the line for the icon to fit. -js: https://github.com/mapbox/mapbox-gl-js/pull/2077/files
* [core] support tiles with non-4096 extentsAnsis Brammanis2016-02-021-3/+3
| | | | | Convert all geometries to the maximum extent supported by our buffers and then use that constant extent everywhere else.
* [core] add namespace comment to closing braceKonstantin Käfer2015-12-031-1/+1
|
* [core] Fix std::move() misuse that disables copy elisionKonstantin Käfer2015-12-031-1/+1
|
* don't use certain STL functionsKonstantin Käfer2015-08-041-1/+1
| | | | 
some functions defined in <cmath>, as well as std::to_string aren't available on GNU's STL for some platforms, e.g. Android
* Replace size() with empty() whenever possibleBruno de Oliveira Abinader2015-07-291-1/+1
| | | | | | Before C++11, std::list's implementation of size was O(n). It should be all O(1) now, but it is probably still a good idea to use empty() to emphasize the intend.
* Updates to labels along linesNicki Dlugash2015-07-091-14/+31
| | | | | | | | | | | | Added a filter to remove anchors with the same text that are too close to each other. Updates to spacing and offset of anchor placement along lines: Takes into account icon size for calculating label length. Recalculates spacing for long labels. Adjusts offsets to first anchors if line is continued from outside the tile boundary.
* use floats when resampling lines to match -jsAnsis Brammanis2015-05-291-3/+3
| | | | This fixes many small render test and collision differences.
* port checkMaxAngle from -jsAnsis Brammanis2015-04-011-4/+4
|
* port getAnchors from -jsAnsis Brammanis2015-04-011-0/+79