summaryrefslogtreecommitdiff
path: root/src/mbgl/geometry/line_atlas.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mbgl/geometry/line_atlas.cpp')
-rw-r--r--src/mbgl/geometry/line_atlas.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/mbgl/geometry/line_atlas.cpp b/src/mbgl/geometry/line_atlas.cpp
index 106a24d015..3a6838bdc1 100644
--- a/src/mbgl/geometry/line_atlas.cpp
+++ b/src/mbgl/geometry/line_atlas.cpp
@@ -122,6 +122,19 @@ LinePatternPos LineAtlas::addDash(const std::vector<float>& dasharray, LinePatte
return position;
}
+void LineAtlas::clear() {
+ positions.clear();
+ nextRow = 0;
+ dirty = true;
+}
+
+uint32_t LineAtlas::getSpace() const {
+ if (image.size.height > nextRow) {
+ return image.size.height - nextRow;
+ }
+ return 0;
+}
+
Size LineAtlas::getSize() const {
return image.size;
}