You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to the SVG 1.1 specification the grammar for SVG Path data can have only one Move-to (M or m) command and a single coordinate pair. See below for example derivation, with production steps. At any point where a nonterminal is optional, it is omitted:
However, putting sample SVG (Attached) into the SVGViewer gives the below exception. Using a Path with one more argument (Sample) renders without an exception.
System.ArgumentException was unhandled
HResult=-2147024809
Message=Parameter is not valid.
Source=System.Drawing
StackTrace:
at System.Drawing.Drawing2D.GraphicsPath.get_PathPoints()
at Svg.SvgPath.RenderStroke(ISvgRenderer renderer) in d:\repos\SVG\Source\Paths\SvgPath.cs:line 159
at Svg.SvgVisualElement.Render(ISvgRenderer renderer, Boolean renderFilter) in d:\repos\SVG\Source\Basic Shapes\SvgVisualElement.cs:line 153
at Svg.SvgVisualElement.Render(ISvgRenderer renderer) in d:\repos\SVG\Source\Basic Shapes\SvgVisualElement.cs:line 109
at Svg.SvgElement.RenderChildren(ISvgRenderer renderer) in d:\repos\SVG\Source\SvgElement.cs:line 726
at Svg.SvgElement.Render(ISvgRenderer renderer) in d:\repos\SVG\Source\SvgElement.cs:line 714
at Svg.SvgFragment.Render(ISvgRenderer renderer) in d:\repos\SVG\Source\Document Structure\SvgFragment.cs:line 169
at Svg.SvgDocument.Draw(Bitmap bitmap) in d:\repos\SVG\Source\SvgDocument.cs:line 501
at Svg.SvgDocument.Draw() in d:\repos\SVG\Source\SvgDocument.cs:line 466
at SVGViewer.SVGViewer.RenderSvg(SvgDocument svgDoc) in d:\repos\SVG\Samples\SVGViewer\SvgViewer.cs:line 48
at SVGViewer.SVGViewer.open_Click(Object sender, EventArgs e) in d:\repos\SVG\Samples\SVGViewer\SvgViewer.cs:line 29
at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
at System.Windows.Forms.ToolStripButton.OnClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ToolStrip.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at SVGViewer.Program.Main() in d:\repos\SVG\Samples\SVGViewer\Program.cs:line 18
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException:
Overview
According to the SVG 1.1 specification the grammar for SVG Path data can have only one Move-to (
M
orm
) command and a single coordinate pair. See below for example derivation, with production steps. At any point where a nonterminal is optional, it is omitted:However, putting sample SVG (Attached) into the SVGViewer gives the below exception. Using a Path with one more argument (Sample) renders without an exception.
File summary:
The text was updated successfully, but these errors were encountered: