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

Re: [XaraXtreme-dev] Patch for Line Endcap and options dialog bug fix



The only changes I still have that have not been applied are the three
color-related changes from my email entitled "some contributions". If
you want me to send them again, I can do that. Otherwise let me know if
you are rejecting them so that I can back out the changes on my end.

Attached is another patch for the SVG filter. 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.

This patch was made from the top level source directory (unlike my other
SVG filter patches). Sorry for the flip-flop. From now on I'll just
submit my patches from the top level.

Alex Bligh wrote:
> JLM wrote:
>> Attached are two patches. The first fixes a wxAssertFail in wxWidgets
>> 2.8. When opening the options dialog, two assertions are triggered. It
>> appears that wxWidgets 2.8 does not like it when you add a notebook page
>> to a notebook with an empty image list. This fix simply moves the line
>> that adds the image to the image list just before adding the notebook
>> page to the notebook.
>>
>> I have tested this fix in both wx 2.8 and 2.6. I think this fix should
>> go into subversion at the same time as the rest of my wx 2.8 changes.
> 
> I have applied this - thanks
> 
>> The second patch adds line endcap styles to the SVG importer. Works the
>> same as the line join type style patch. This patch was created from
>> within the filters/SVGFilter directory, so the file names are relative
>> to that location.
> 
> I have not applied this as I know very little about the SVG importer.
> Luke?
> 
> JLM - I think all your stuff bar the above patch is now applied; please
> could you confirm?
> 
> Alex
> 
Index: filters/SVGFilter/xargenerator.cpp
===================================================================
--- filters/SVGFilter/xargenerator.cpp	(revision 1774)
+++ filters/SVGFilter/xargenerator.cpp	(working copy)
@@ -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()) {