summaryrefslogtreecommitdiff
path: root/include/mbgl/style/types.hpp
diff options
context:
space:
mode:
authorAnsis Brammanis <brammanis@gmail.com>2015-07-06 16:47:04 +0200
committerAnsis Brammanis <brammanis@gmail.com>2015-07-08 16:16:51 +0200
commit888ae5ebdc11703023ada9bc3dd1d113cfe52314 (patch)
tree4374eefd7b2f511308fa52694f88f97120683df2 /include/mbgl/style/types.hpp
parent675ddddee78fa36d60d55c266033f05edda4be48 (diff)
downloadqtlocation-mapboxgl-888ae5ebdc11703023ada9bc3dd1d113cfe52314.tar.gz
improve round line joins for semi-transparent lines
https://github.com/mapbox/mapbox-gl-js/pull/1359 Round line joins used to be drawn by adding a semicircle cap to the end of each segment. This looked fine for opaque lines not for semi-transparent lines. This changes the triangulation so that round line joins don't overlap with segments. The gap between segments is filled with small triangles that look like pie slices. The edge of the round linejoin is made up of many short straight lines that look round at the sizes we draw lines. Since sharp angles are infrequent, this does not significantly affect the total number of triangles created. Joins for angles that are really sharp are still drawn with overlap.
Diffstat (limited to 'include/mbgl/style/types.hpp')
-rw-r--r--include/mbgl/style/types.hpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/mbgl/style/types.hpp b/include/mbgl/style/types.hpp
index f6ffcd6865..e46ece6f4a 100644
--- a/include/mbgl/style/types.hpp
+++ b/include/mbgl/style/types.hpp
@@ -92,6 +92,8 @@ enum class JoinType : uint8_t {
Miter,
Bevel,
Round,
+ // the following two types are for internal use only
+ FakeRound,
FlipBevel
};
@@ -99,6 +101,7 @@ MBGL_DEFINE_ENUM_CLASS(JoinTypeClass, JoinType, {
{ JoinType::Miter, "miter" },
{ JoinType::Bevel, "bevel" },
{ JoinType::Round, "round" },
+ { JoinType::FakeRound, "fakeround" },
{ JoinType::FlipBevel, "flipbevel" },
});