summaryrefslogtreecommitdiff
path: root/include/mbgl/text/glyph_store.hpp
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2014-08-05 16:18:23 +0200
committerKonstantin Käfer <mail@kkaefer.com>2014-08-05 16:18:23 +0200
commit898c5dc7c3ebf36c6a4df3ab62ad6aacfc82985a (patch)
treefc546a2747f9b244bdc2afc79df0ec65e2625fb0 /include/mbgl/text/glyph_store.hpp
parent05b95ab05714a05901c92fc52a23ba21ec14925a (diff)
downloadqtlocation-mapboxgl-898c5dc7c3ebf36c6a4df3ab62ad6aacfc82985a.tar.gz
port text alignment algorithm
Diffstat (limited to 'include/mbgl/text/glyph_store.hpp')
-rw-r--r--include/mbgl/text/glyph_store.hpp17
1 files changed, 6 insertions, 11 deletions
diff --git a/include/mbgl/text/glyph_store.hpp b/include/mbgl/text/glyph_store.hpp
index 9c874b31b0..66cf8e75b3 100644
--- a/include/mbgl/text/glyph_store.hpp
+++ b/include/mbgl/text/glyph_store.hpp
@@ -3,6 +3,7 @@
#include <mbgl/text/glyph.hpp>
#include <mbgl/util/pbf.hpp>
+#include <mbgl/util/vec.hpp>
#include <cstdint>
#include <vector>
@@ -30,17 +31,11 @@ public:
void insert(uint32_t id, const SDFGlyph &glyph);
const std::map<uint32_t, GlyphMetrics> &getMetrics() const;
const std::map<uint32_t, SDFGlyph> &getSDFs() const;
- const Shaping getShaping(const std::u32string &string,
- const float &maxWidth,
- const float &lineHeight,
- const float &alignment,
- const float &verticalAlignment,
- const float &letterSpacing) const;
- void lineWrap(Shaping &shaping,
- const float &lineHeight,
- const float &maxWidth,
- const float &alignment,
- const float &verticalAlignment) const;
+ const Shaping getShaping(const std::u32string &string, float maxWidth, float lineHeight,
+ float horizontalAlign, float verticalAlign, float justify,
+ float spacing, const vec2<float> &translate) const;
+ void lineWrap(Shaping &shaping, float lineHeight, float maxWidth, float horizontalAlign,
+ float verticalAlign, float justify) const;
private:
std::map<uint32_t, std::string> bitmaps;