line-join defaults to miter (fixes #384)

This commit is contained in:
John Firebaugh
2014-07-25 11:45:56 -07:00
parent bf1924c4c9
commit 600e1d8a9e
2 changed files with 5 additions and 7 deletions

View File

@@ -42,19 +42,17 @@ enum class WindingType : uint8_t {
};
enum class CapType : uint8_t {
None,
Round,
Butt,
Square,
Default = None
Default = Butt
};
enum class JoinType : uint8_t {
None,
Miter,
Bevel,
Round,
Default = None
Default = Miter
};
enum class TextPathType : uint8_t {
@@ -100,14 +98,14 @@ inline CapType parseCapType(const std::string &cap) {
if (cap == "round") return CapType::Round;
if (cap == "butt") return CapType::Butt;
if (cap == "square") return CapType::Square;
return CapType::None;
return CapType::Default;
}
inline JoinType parseJoinType(const std::string &join) {
if (join == "miter") return JoinType::Miter;
if (join == "bevel") return JoinType::Bevel;
if (join == "round") return JoinType::Round;
return JoinType::None;
return JoinType::Default;
}
inline TextPathType parseTextPathType(const std::string &path) {

View File

@@ -80,7 +80,7 @@ void LineBucket::addGeometry(const std::vector<Coordinate>& vertices) {
CapType beginCap = properties.cap;
CapType endCap = closed ? CapType::Butt : properties.cap;
JoinType currentJoin = JoinType::None;
JoinType currentJoin = JoinType::Default;
Coordinate currentVertex = Coordinate::null(),
prevVertex = Coordinate::null(),