summaryrefslogtreecommitdiff
path: root/include/llmr/text/placement.hpp
blob: c245e260f020238ed45d1f1a74735453eed9c8db (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
33
34
35
36
37
#ifndef LLMR_TEXT_PLACEMENT
#define LLMR_TEXT_PLACEMENT

#include <llmr/text/collision.hpp>
#include <llmr/geometry/geometry.hpp>
#include <llmr/util/vec.hpp>
#include <llmr/text/glyph.hpp>
#include <vector>

namespace llmr {

class TextBucket;
class StyleBucketText;

class Placement {
public:
    Placement(int8_t zoom);

    void addFeature(TextBucket &bucket, const std::vector<Coordinate> &line,
                    const StyleBucketText &info,
                    const GlyphPositions &face,
                    const Shaping &shaping);

private:
    const int8_t zoom;
    Collision collision;
    const float zOffset;
    const float maxPlacementScale;

public:
    static const int tileExtent;
    static const int glyphSize;
    static const float minScale;
};
}

#endif