EtheaDev / SVGIconImageList

Three engines to render SVG (Delphi Image32, Skia4Delphi, Direct2D wrapper) and four components to simplify use of SVG images (resize, fixedcolor, grayscale...)
Apache License 2.0
321 stars 93 forks source link

Some SVGs drawn black #148

Closed rittjom closed 3 years ago

rittjom commented 3 years ago

Some of my SVGs get rendered complety black instead of the regular colors.

In the Attached file you can see the difference between TSvgIconImage in a VCL Windows Form and Edge Browser. svg_issue

Here's the SVG Text: `<?xml version="1.0" encoding="UTF-8"?>

`
carloBarazzetta commented 3 years ago

Yes, I noticed it's a problem using the native TSVG engine instead of the Direct2D engine, and the reason is that fill:rgb with percentage values ​​doesn't work: if you try to change the RGB values ​​to an integer (0 to 255) instead of percentage it works well with the native TSVG engine. I will investigate svg parser to implement rgb with percentage value... or you can try yourself if you want... ;-)

carloBarazzetta commented 3 years ago

Fixed now!

rittjom commented 3 years ago

Wow, what a quick fix. Thank you very much :) 👍