This commit is contained in:
Young Hahn
2014-05-29 05:05:48 -04:00
parent 36796490de
commit d82acee8c7
10 changed files with 76 additions and 68 deletions

View File

@@ -7,6 +7,7 @@
#include <llmr/style/style.hpp>
#include <llmr/map/vector_tile.hpp>
#include <llmr/text/placement.hpp>
#include <llmr/text/glyph_store.hpp>
#include <llmr/util/constants.hpp>
#include <llmr/util/math.hpp>
@@ -99,7 +100,7 @@ void TextBucket::addGlyphs(const PlacedGlyphs &glyphs, float placementZoom,
};
void TextBucket::addFeature(const VectorTileFeature &feature,
const IndexedFaces &faces,
const GlyphPositions &face,
const std::map<Value, Shaping> &shapings) {
auto it_prop = feature.properties.find(geom_desc.field);
if (it_prop == feature.properties.end()) {
@@ -134,14 +135,14 @@ void TextBucket::addFeature(const VectorTileFeature &feature,
while ((cmd = geometry.next(x, y)) != Geometry::end) {
if (cmd == Geometry::move_to) {
if (!line.empty()) {
placement.addFeature(*this, line, geom_desc, faces, shaping);
placement.addFeature(*this, line, geom_desc, face, shaping);
line.clear();
}
}
line.emplace_back(x, y);
}
if (line.size()) {
placement.addFeature(*this, line, geom_desc, faces, shaping);
placement.addFeature(*this, line, geom_desc, face, shaping);
}
}