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
Hi, I got the following exception when calling .Draw() on an SvgDocument that has a linear gradient in it:
System.ArgumentException: ColorBlend object that was set is not valid.Position's last element must be equal to 1.0. ColorBlend objects must be constructed with the same number of positions and color values. Positions must be between 0.0 and 1.0, 1.0 indicating the last element in the array.
at System.Drawing.Drawing2D.LinearGradientBrush.set_InterpolationColors(ColorBlend value)
at Svg.SvgLinearGradientServer.GetBrush(SvgVisualElement renderingElement, ISvgRenderer renderer, Single opacity, Boolean forStroke)
at Svg.SvgDeferredPaintServer.GetBrush(SvgVisualElement styleOwner, ISvgRenderer renderer, Single opacity, Boolean forStroke)
at Svg.SvgVisualElement.RenderFill(ISvgRenderer renderer)
at Svg.SvgVisualElement.RenderFillAndStroke(ISvgRenderer renderer)
at Svg.SvgVisualElement.RenderInternal(ISvgRenderer renderer, Action`1 renderMethod)
at Svg.SvgVisualElement.RenderInternal(ISvgRenderer renderer, Boolean renderFilter)
at Svg.SvgElement.RenderChildren(ISvgRenderer renderer)
at Svg.SvgVisualElement.RenderInternal(ISvgRenderer renderer, Action`1 renderMethod)
at Svg.SvgVisualElement.RenderInternal(ISvgRenderer renderer, Boolean renderFilter)
at Svg.SvgElement.RenderChildren(ISvgRenderer renderer)
at Svg.SvgVisualElement.RenderInternal(ISvgRenderer renderer, Action`1 renderMethod)
at Svg.SvgVisualElement.RenderInternal(ISvgRenderer renderer, Boolean renderFilter)
at Svg.SvgElement.RenderChildren(ISvgRenderer renderer)
at Svg.SvgElement.Render(ISvgRenderer renderer)
at Svg.SvgFragment.Render(ISvgRenderer renderer)
at Svg.SvgDocument.Draw(ISvgRenderer renderer, ISvgBoundable boundable)
at Svg.SvgDocument.Draw(Int32 rasterWidth, Int32 rasterHeight)
I see this issue has already been fixed before with the following PR: #314
But it looks like it has been reintroduced by the following commit: 1067717
Used Versions
SVG version: 3.4.0
.NET 6.0
Windows
The text was updated successfully, but these errors were encountered:
Description
Hi, I got the following exception when calling .Draw() on an SvgDocument that has a linear gradient in it:
I see this issue has already been fixed before with the following PR:
#314
But it looks like it has been reintroduced by the following commit:
1067717
Used Versions
SVG version: 3.4.0
.NET 6.0
Windows
The text was updated successfully, but these errors were encountered: