SKIA drawPicture - unwanted thin outline

hi all,

I export some shapes from illustrator to svg. I set their outline to “none”, so they should just have a solíd fill colour. yet, when I draw them, the all have 1px black outlines.

image

webbrowser preview does not have these outlines:
image

turns out I have to remove the “stroke-width” tag completely from the svg code in order for my objects to be drawn correctly.

image

Is is possible to remove this using a skia node, or can somebody share how to set this in illustrator? Anybody here still using illustrator?

thx :)

Don’t have Illustrator can’t check.

But looking at the SVG spec stroke-width is supposed to have a value of type length-percentage or number. none doesn’t seem to be a valid value.

The stroke property on the other hand has an initial value of none.

Looks like Illustrator is mixing up these two somehow and/or doesn’t implement the spec correctly.

A simple SVG of an ellipse with fill and no stroke created in Inkscape (saved as “plain” ):

<ellipse
       style="fill:#dfdfdf;stroke-width:0;stroke:none;stroke-dasharray:none;fill-opacity:1"
       id="path1"
       cx="104.74265"
       cy="111.45588"
       rx="57.507355"
       ry="55.323528" />

SVG created in Affinity Designer:

<ellipse cx="1897.52" cy="1229.09" rx="541.092" ry="560.285" style="fill:rgb(235,235,235);"/>

Try to open one of your SVGs in an other editor and re-save them? Wonder how / if the editors can deal with and maybe “repair” them.

sublime search stroke-width="none"replace stroke="none" ;)
or just remove the attribute completely if value is none. probably faster than using any svg editor.

I remember pasting svg xml to chat gpt and asking it to generate c# code to convert every circle and rectangle into paths … pretty sure it can help you cure your faulty svg as well without having to manually edit your file. Also more sustainable if you need to ever re-export the source.

1 Like

I have a lot of artboards and need a fast workflow to update all exported images. I guess I have to patch a converter.

Thx for tuning in, guys

Like I said, the chat gpt successfully generated some vvvv compatible c# code that was sanitizing the svg in vvvv back then, right after the xml reader (so no need to convert and write back the file at all). Would probably give this a shot for the 2 minutes it takes before patching it yourself

1 Like