mogest / prawn-svg

SVG renderer for Prawn Ruby PDF library
MIT License
181 stars 55 forks source link

linearGradient does not support stop-opacity attribute #117

Open habamax opened 4 years ago

habamax commented 4 years ago

I have created issue in asciidoctor-pdf https://github.com/asciidoctor/asciidoctor-pdf/issues/1561 But not sure if it is related to asciidoctor-pdf itself.

So there is a simple box with a linear gradient created in inkscape:

image

asciidoctor-pdf renders it

image

svg-file: box-gradient.zip

Thank you!

mogest commented 4 years ago

Hi @habamax. Unfortunately prawn-svg doesn't support the stop-opacity attribute and there's no easy way to make it support it as prawn doesn't either.

There was another thing about your sample svg that prawn-svg didn't support (a gradient using an href to inherit from another gradient). I've implemented that, but it doesn't help in your specific case I'm sorry :(

habamax commented 4 years ago

Hi @mogest , indeed, @mojavelinux explained it to me.

Too bad inksape does simple gradients in unsupported way, but well, that is life :)

Thank you!