summaryrefslogtreecommitdiff
path: root/include/mbgl/text/collision.hpp
blob: 31103a743960f581c0d12c3911aa72a7eb6930a5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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