diff options
Diffstat (limited to 'src/mbgl/text/collision_feature.hpp')
-rw-r--r-- | src/mbgl/text/collision_feature.hpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/mbgl/text/collision_feature.hpp b/src/mbgl/text/collision_feature.hpp index 006a47eb74..3b6e461a26 100644 --- a/src/mbgl/text/collision_feature.hpp +++ b/src/mbgl/text/collision_feature.hpp @@ -11,11 +11,16 @@ namespace mbgl { class CollisionBox { public: - CollisionBox(Point<float> _anchor, float _x1, float _y1, float _x2, float _y2, float _maxScale) : - anchor(std::move(_anchor)), x1(_x1), y1(_y1), x2(_x2), y2(_y2), maxScale(_maxScale) {} + CollisionBox(Point<float> _anchor, Point<float> _offset, float _x1, float _y1, float _x2, float _y2, float _maxScale) : + anchor(std::move(_anchor)), offset(_offset), x1(_x1), y1(_y1), x2(_x2), y2(_y2), maxScale(_maxScale) {} + + float adjustedMaxScale(const std::array<float, 4>& rotationMatrix, const float yStretch) const; // the box is centered around the anchor point Point<float> anchor; + + // the offset of the box from the label's anchor point + Point<float> offset; // distances to the edges from the anchor float x1; @@ -34,7 +39,7 @@ public: class CollisionFeature { public: enum class AlignmentType : bool { - Straight = 0, + Straight = false, Curved }; |