1 #pragma once 2 3 #include <mbgl/text/glyph.hpp> 4 #include <mbgl/renderer/image_atlas.hpp> 5 #include <mbgl/style/types.hpp> 6 7 namespace mbgl { 8 9 class SymbolFeature; 10 class BiDi; 11 12 class PositionedIcon { 13 private: PositionedIcon(ImagePosition image_,float top_,float bottom_,float left_,float right_,float angle_)14 PositionedIcon(ImagePosition image_, 15 float top_, 16 float bottom_, 17 float left_, 18 float right_, 19 float angle_) 20 : _image(std::move(image_)), 21 _top(top_), 22 _bottom(bottom_), 23 _left(left_), 24 _right(right_), 25 _angle(angle_) {} 26 27 ImagePosition _image; 28 float _top; 29 float _bottom; 30 float _left; 31 float _right; 32 float _angle; 33 34 public: 35 static PositionedIcon shapeIcon(const ImagePosition&, 36 const std::array<float, 2>& iconOffset, 37 style::SymbolAnchorType iconAnchor, 38 const float iconRotation); 39 image() const40 const ImagePosition& image() const { return _image; } top() const41 float top() const { return _top; } bottom() const42 float bottom() const { return _bottom; } left() const43 float left() const { return _left; } right() const44 float right() const { return _right; } angle() const45 float angle() const { return _angle; } 46 }; 47 48 const Shaping getShaping(const std::u16string& string, 49 float maxWidth, 50 float lineHeight, 51 style::SymbolAnchorType textAnchor, 52 style::TextJustifyType textJustify, 53 float spacing, 54 const Point<float>& translate, 55 float verticalHeight, 56 const WritingModeType, 57 BiDi& bidi, 58 const Glyphs& glyphs); 59 60 } // namespace mbgl 61