diff --git a/src/exportvector.cpp b/src/exportvector.cpp index 7bb2e88..7b021c1 100644 --- a/src/exportvector.cpp +++ b/src/exportvector.cpp @@ -200,6 +200,11 @@ public: case StipplePattern::CONTINUOUS: break; + case StipplePattern::SHORT_DASH: + type.path.push_back(sw); + type.path.push_back(-sw * 2.0); + break; + case StipplePattern::DASH: type.path.push_back(sw); type.path.push_back(-sw); @@ -715,6 +720,7 @@ bool DxfFileWriter::NeedToOutput(Constraint *c) { const char *DxfFileWriter::lineTypeName(StipplePattern stippleType) { switch(stippleType) { case StipplePattern::CONTINUOUS: return "CONTINUOUS"; + case StipplePattern::SHORT_DASH: return "DASHED"; case StipplePattern::DASH: return "DASHED"; case StipplePattern::LONG_DASH: return "DASHEDX2"; case StipplePattern::DASH_DOT: return "DASHDOT"; @@ -744,6 +750,9 @@ static std::string MakeStipplePattern(StipplePattern pattern, double scale, char case StipplePattern::CONTINUOUS: return ""; + case StipplePattern::SHORT_DASH: + result = ssprintf("%.3f_%.3f", scale, scale * 2.0); + break; case StipplePattern::DASH: result = ssprintf("%.3f_%.3f", scale, scale); break; diff --git a/src/glhelper.cpp b/src/glhelper.cpp index c0fcff5..979b248 100644 --- a/src/glhelper.cpp +++ b/src/glhelper.cpp @@ -120,6 +120,7 @@ void ssglStippledLine(Vector a, Vector b, double width, const char *stipplePattern; switch(stippleType) { case StipplePattern::CONTINUOUS: ssglLine(a, b, width, maybeFat); return; + case StipplePattern::SHORT_DASH: stipplePattern = "- "; break; case StipplePattern::DASH: stipplePattern = "- "; break; case StipplePattern::LONG_DASH: stipplePattern = "_ "; break; case StipplePattern::DASH_DOT: stipplePattern = "-."; break; diff --git a/src/sketch.h b/src/sketch.h index 306ea2f..0aabe67 100644 --- a/src/sketch.h +++ b/src/sketch.h @@ -36,13 +36,14 @@ enum class PolyError : uint32_t { enum class StipplePattern : uint32_t { CONTINUOUS = 0, - DASH = 1, - LONG_DASH = 2, - DASH_DOT = 3, - DASH_DOT_DOT = 4, - DOT = 5, - FREEHAND = 6, - ZIGZAG = 7, + SHORT_DASH = 1, + DASH = 2, + LONG_DASH = 3, + DASH_DOT = 4, + DASH_DOT_DOT = 5, + DOT = 6, + FREEHAND = 7, + ZIGZAG = 8, LAST = ZIGZAG }; diff --git a/src/style.cpp b/src/style.cpp index e3803ae..4293848 100644 --- a/src/style.cpp +++ b/src/style.cpp @@ -777,6 +777,7 @@ void TextWindow::ShowStyleInfo() { const size_t patternCount = (size_t)StipplePattern::LAST + 1; const char *patternsSource[patternCount] = { "___________", + "- - - - ", "- - - - - -", "__ __ __ __", "-.-.-.-.-.-",