summaryrefslogtreecommitdiff
path: root/include/llmr/text/collision.hpp
blob: c9dafdd386717aae516c96cdd596c9b5d7071f63 (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 LLMR_TEXT_COLLISION
#define LLMR_TEXT_COLLISION

#include <llmr/text/types.hpp>

namespace llmr {

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