mozman / svgwrite

Python Package to write SVG files (UNMAINTAINED)
Other
548 stars 97 forks source link

Inclusion of " none" in svg file while using Pattern #121

Open schatty opened 5 months ago

schatty commented 5 months ago

Hello, I have an issue using Pattern logic. For example, running the example from https://github.com/mozman/svgwrite/blob/master/examples/pattern.py

results in the following svg file

<?xml version="1.0" encoding="utf-8" ?>
<svg baseProfile="full" height="15cm" version="1.1" viewBox="0,0,200,150" width="20cm" xmlns="http://www.w3.org/2000/svg" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><pattern height="20" id="id1" patternUnits="userSpaceOnUse" width="20"><circle cx="10" cy="10" r="5" /></pattern></defs><circle cx="100" cy="100" fill="url(#id1) none" r="50" /></svg>

The svg file doesn't show anything unless we remove " none" part from fill="url(#id1) none". After removal of " none", the svg displays correctly. The same " none" string is added every time I use Pattern in other scenarios. Is it a known or platform specific issue? Thanks

I use svgwrite==1.4.3 on MacOS Sonoma

Thanks