summaryrefslogtreecommitdiff
path: root/include/mbgl/text/collision.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/mbgl/text/collision.hpp')
-rw-r--r--include/mbgl/text/collision.hpp32
1 files changed, 32 insertions, 0 deletions
diff --git a/include/mbgl/text/collision.hpp b/include/mbgl/text/collision.hpp
new file mode 100644
index 0000000000..31103a7439
--- /dev/null
+++ b/include/mbgl/text/collision.hpp
@@ -0,0 +1,32 @@
+#ifndef MBGL_TEXT_COLLISION
+#define MBGL_TEXT_COLLISION
+
+#include <mbgl/text/types.hpp>
+
+namespace mbgl {
+
+class Collision {
+
+public:
+ Collision();
+ ~Collision();
+
+ PlacementProperty place(const GlyphBoxes &boxes,
+ const CollisionAnchor &anchor,
+ float minPlacementScale, float maxPlacementScale,
+ float padding, bool horizontal, bool alwaysVisible);
+ float getPlacementScale(const GlyphBoxes &glyphs, float minPlacementScale,
+ float maxPlacementScale, float pad);
+ PlacementRange getPlacementRange(const GlyphBoxes &glyphs,
+ float placementScale, bool horizontal);
+ void insert(const GlyphBoxes &glyphs, const CollisionAnchor &anchor,
+ float placementScale, const PlacementRange &placementRange,
+ bool horizontal, float padding);
+
+private:
+ void *cTree;
+ void *hTree;
+};
+}
+
+#endif