h/t @ChrisLoer catching this place where we were relying on member
initialization order. While it _happened_ to be okay here, it's
unnecessarily fragile.
* Verbose commenting on getSegmentGlyphs
This came out of @cloer and @anandthakker trying to figure out
how getSegmentGlyphs actually worked.
Goal is to use this commented version as the base for a refactor.
* Refactor getSegmentGlyphs for clarity.
* Add more documentation, inline helper functions
* Initialize VirtualSegments directly
* Fix virtual anchor diagram
This converts the style property classes (CirclePaintProperties and so on) to the same tuple-based approach as gl::Attribute and gl::Uniform. The approach is outlined in https://github.com/mapbox/cpp/blob/master/C%2B%2B%20Structural%20Metaprogramming.md.
The main advantage of this approach is it allows writing algorithms that work on sets of style properties, without resorting to code generation or manually repetitive code. This lets us iterate on approaches to data-driven properties more easily.
Another advantage is that the cascading, unevaluated, and evaluated states of a set of properties exist as independent structures, instead of individual properties holding their own state. This is a more functional approach that makes data flow clearer and reduces state.
* Add support for icon-text-fit
* Port unit tests for getIconQuads() from js => cpp
* Add support for padding in all 4 directions.
* Update all hashes post-merge
Tile is now the main base class; RasterTile, VectorTile, etc are its subclasses. GeometryTileData and its subclasses form the piece that's passed to the worker.
* First pass at port of https://github.com/mapbox/mapbox-gl-js/pull/2668
* RotationAlignmentType => AlignmentType
* Handle undefined default value for text-pitch-alignment and implement inheritance for this value from text-rotation-alignment
* Update dependencies
* Move handling fo undefined default value out of camelize functions
When an anchor is at the beginning of a line, its segment’s coordinates match its own coordinates, resulting in an angle of 0°. When the segment’s coordinates match the anchor’s coordinates, consider the next segment instead.
Fixes#2474.