Azgaar / Armoria

Heraldry generator and editor
https://azgaar.github.io/Armoria
280 stars 30 forks source link

Saving an SVG without a gradient produces a black appearance #64

Closed schizoidnightmares closed 3 years ago

schizoidnightmares commented 3 years ago

Setting the gradient to "No" will cause the SVG to render as a black background.

A workaround to this is to simply manually edit the SVG file by removing the following near the bottom: <path class="grad" d="M 10,40 h180 v120 h-180 Z" fill="url(#no)" stroke="#333333" stroke-width="0" style="pointer-events: none;"/>

Note that this line may appear differently in practice.

github-actions[bot] commented 3 years ago

Hello, fellow tester! Thanks for raising the issue, I will review it as soon as possible.

Azgaar commented 3 years ago

Hello. It looks it's ok for me, can you show a screenshot? It's not super clear.

schizoidnightmares commented 3 years ago

Hello. It looks it's ok for me, can you show a screenshot? It's not super clear.

There's nothing much to show as it appears simply as black.

Create any emblem (the setting I am using is specifically Shield -> Banner -> Flag)...

Options -> Gradient -> No Save -> Download SVG

This is what I get: `

`

Huh. So it turns out, after testing that in Chrome, it does show normal. However, macOS Big Sur's preview in the Finder displays it as black. It only shows normal in macOS if <path class="grad" d="M 10,40 h180 v120 h-180 Z" fill="url(#no)" stroke="#333333" stroke-width="0" style="pointer-events: none;"/> is removed from the SVG.

I am guessing we're both running a different OS, hence why maybe the issue does not appear on your end. Keep in mind, gradients do show up fine on Big Sur finder's preview, only when it is set to "no" does it display as black provided the SVG is left unmodified.

Azgaar commented 3 years ago

Thanks. I have changed the code to not add gradient reference if it's "no". So it should be fine now, please check

schizoidnightmares commented 3 years ago

Thanks. I have changed the code to not add gradient reference if it's "no". So it should be fine now, please check

Checked and confirmed it is now fixed on my end. I appreciate the fix.

Azgaar commented 3 years ago

Thanks for the report, closing