ITADN

Don't draw fill of line

#88OpenEpicEricEE 创建于 2025-04-26
E
EpicEricEEcommented
When converting the image ```svg <svg height="200" width="300" xmlns="http://www.w3.org/2000/svg"> <line x1="0" y1="0" x2="300" y2="200" stroke="#FF0000" stroke-width="5" stroke-opacity="30%" /> </svg> ``` the line is drawn with a fill and stroke: ```tex % Fill of line (black) q /cs0 cs 0 0 0 scn 0 0 m 300 200 l f Q % Stroke of line (transparent red) q /gs0 gs /cs0 CS 1 0 0 SCN 5 w 4 M 0 J 0 j [] 0 d 0 0 m 300 200 l S Q ``` Even though the line has no inner area, the black fill is still visible as an additional line in some viewers (Chrome, Edge, but not PDF.js). ![Image](https://github.com/user-attachments/assets/b9b93c7e-6047-49b2-b761-262898b26370) This can be circumvented by explicitly setting the line's fill to `"none"`, but that probably shouldn't be necessary.
3 条评论