[Date Prev][Date Next][Thread Prev][Thread Next][Thread Index]

[XaraXtreme-commits] Commit Complete



Commit by  : luke
Repository : xara
Revision   : 1775
Date       : Wed Jun 20 11:20:47 BST 2007

Changed paths:
   M /Trunk/XaraLX/filters/SVGFilter/xargenerator.cpp

[JLM]This outputs a line joint type of mitre for those lines that have no joint type specified. This is the default for the SVG standard.


Diff:
Index: Trunk/XaraLX/filters/SVGFilter/xargenerator.cpp
===================================================================
--- Trunk/XaraLX/filters/SVGFilter/xargenerator.cpp	(revision 1774)
+++ Trunk/XaraLX/filters/SVGFilter/xargenerator.cpp	(revision 1775)
@@ -974,27 +974,39 @@
 		ok = m_pExporter->WriteRecord(&Rec);
 	}
 
-	if (witch & STYLE_STROKE_LINEJOIN && style.IsStrokeLineJoinDefined()) {
-		JointType jt=style.GetStrokeLineJoin();
+	if (witch & STYLE_STROKE_LINEJOIN )
+	{
+		JointType jt;
+		if (style.IsStrokeLineJoinDefined()) {
+			jt=style.GetStrokeLineJoin();
+
+#if SVGDEBUG
+			switch(jt)
+			{
+				case MitreJoin:
+					svgtrace(DBGTRACE_STYLES, "stroke join mitre\n");
+				break;
+				case BevelledJoin:
+					svgtrace(DBGTRACE_STYLES, "stroke join bevel\n");
+				break;
+				case RoundJoin:
+					svgtrace(DBGTRACE_STYLES, "stroke join round\n");
+				break;
+			}
+#endif
+		} else {
+			jt=MitreJoin;
+
+#if SVGDEBUG
+			svgtrace(DBGTRACE_STYLES, "no stroke specified, using mitre\n");
+#endif
+
+		}
+
 		Rec.Reinit(TAG_JOINSTYLE, TAG_JOINSTYLE_SIZE);
 		ok = Rec.WriteBYTE(BYTE(jt));
 		ok = m_pExporter->WriteRecord(&Rec);
 
-#if SVGDEBUG
-		switch(jt)
-		{
-			case MitreJoin:
-				svgtrace(DBGTRACE_STYLES, "stroke join mitre\n");
-			break;
-			case BevelledJoin:
-				svgtrace(DBGTRACE_STYLES, "stroke join bevel\n");
-			break;
-			case RoundJoin:
-				svgtrace(DBGTRACE_STYLES, "stroke join round\n");
-			break;
-		}
-#endif
-
 	}
 
 	if (witch & STYLE_STROKE_LINECAP && style.IsStrokeLineCapDefined()) {


Xara