blob: decf7b946eb43b19c6138d0f343ea48d62b5578a (
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 MBGL_TEXT_SHAPING
#define MBGL_TEXT_SHAPING
#include <mbgl/text/glyph.hpp>
#include <mbgl/sprite/sprite_atlas.hpp>
#include <mbgl/sprite/sprite_image.hpp>
#include <mapbox/optional.hpp>
#include <mbgl/util/vec.hpp>
namespace mbgl {
struct SpriteAtlasElement;
class PositionedIcon {
public:
inline explicit PositionedIcon() {}
inline explicit PositionedIcon(const SpriteAtlasElement& _image,
float _top, float _bottom, float _left, float _right) :
image(_image), top(_top), bottom(_bottom), left(_left), right(_right) {}
mapbox::util::optional<SpriteAtlasElement> image;
float top = 0;
float bottom = 0;
float left = 0;
float right = 0;
operator bool() const { return image && (*image).pos.hasArea(); }
};
class SymbolLayoutProperties;
PositionedIcon shapeIcon(const SpriteAtlasElement& image, const SymbolLayoutProperties&);
} // namespace mbgl
#endif
|