summaryrefslogtreecommitdiff
path: root/include/mbgl/text/placement.hpp
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2014-08-04 18:24:22 +0200
committerKonstantin Käfer <mail@kkaefer.com>2014-08-04 18:24:22 +0200
commit36181b0922bf4b5bed5b5ca68679338d22dfcf31 (patch)
treebb4d78934e41b59eb80842414908846b2789dc4c /include/mbgl/text/placement.hpp
parent9dd50a29e1e8b975e09172b19b303063a96ba20f (diff)
downloadqtlocation-mapboxgl-36181b0922bf4b5bed5b5ca68679338d22dfcf31.tar.gz
update symbol placement to be more like js
Diffstat (limited to 'include/mbgl/text/placement.hpp')
-rw-r--r--include/mbgl/text/placement.hpp32
1 files changed, 13 insertions, 19 deletions
diff --git a/include/mbgl/text/placement.hpp b/include/mbgl/text/placement.hpp
index 7700f32f0a..28eb8d5317 100644
--- a/include/mbgl/text/placement.hpp
+++ b/include/mbgl/text/placement.hpp
@@ -1,36 +1,30 @@
#ifndef MBGL_TEXT_PLACEMENT
#define MBGL_TEXT_PLACEMENT
-#include <mbgl/text/collision.hpp>
-#include <mbgl/geometry/geometry.hpp>
-#include <mbgl/util/vec.hpp>
+#include <mbgl/text/types.hpp>
#include <mbgl/text/glyph.hpp>
-#include <vector>
+
+#include <mbgl/util/vec.hpp>
namespace mbgl {
-class SymbolBucket;
+struct Anchor;
class StyleBucketSymbol;
class Placement {
public:
- Placement(int8_t zoom, float placementDepth);
+ static Placement getIcon(Anchor &anchor, const Rect<uint16_t> &image, float iconBoxScale,
+ const std::vector<Coordinate> &line, const StyleBucketSymbol &props);
- void addFeature(SymbolBucket &bucket, const std::vector<Coordinate> &line,
- const StyleBucketSymbol &info,
- const GlyphPositions &face,
- const Shaping &shaping);
+ static Placement getGlyphs(Anchor &anchor, const vec2<float> &origin, const Shaping &shaping,
+ const GlyphPositions &face, float boxScale, bool horizontal,
+ const std::vector<Coordinate> &line, const StyleBucketSymbol &props);
-private:
- const int8_t zoom;
- Collision collision;
- const float zOffset;
- const float maxPlacementScale;
+ static const float globalMinScale;
-public:
- static const int tileExtent;
- static const int glyphSize;
- static const float minScale;
+ GlyphBoxes boxes;
+ PlacedGlyphs shapes;
+ float minScale;
};
}