Open
Description
Description
If an svg file contains a circle with small radius (such as 1) which is referenced in a use
element with large scaling and opacity < 1, it doesn't come out as a circle. The circle with radius 1 gets rendered into an image, and then, the resulting image of size 2x2 gets scaled and added to the target renderer.
The thing is that gnuplot using the svg terminal creates these kind of svg files, and technically, it is not wrong to do so.
Example data
The following example shows the problem. It's a real gnuplot output where I removed everything except for one circle. Note r='1'
, scale(9.45)
and opacity='0.58'
):
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<svg
width="3840" height="2160"
viewBox="0 0 3840 2160"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
>
<title>Gnuplot</title>
<desc>Produced by GNUPLOT 5.4 patchlevel 5 </desc>
<g id="gnuplot_canvas">
<rect x="0" y="0" width="3840" height="2160" fill="none"/>
<defs>
<circle id='gpPt5' stroke-width='0.074' stroke='currentColor' cx='0' cy='0' r='1'/>
<use xlink:href='#gpPt5' id='gpPt6' fill='currentColor' stroke='none'/>
</defs>
<use xlink:href='#gpPt6' transform='translate(277.22,196.15) scale(9.45)' color='rgb( 0, 192, 0)' opacity='0.58'/>
</g>
</svg>
Used Versions
NuGet 3.4.4, used in .NET Framework 4.7.2.
Metadata
Metadata
Assignees
Labels
No labels