SVG Import Bug

john's Avatar

john

07 Jul, 2018 12:26 AM

Frederik,

NodeBox has problems importing SVGs with partial opacity and/or a stroke width of 1.

Attached is a demo file and screenshot. I create two boxes with 1-stroke outlines, one solid red, the other red with an alpha of .25 (64/255). I export as SVG then import the same file. Outline is missing and second rectangle has no visible fill (making it invisible).

I checked inside the SVG files and there seem to be two issues:

- stroke-width is not included in the SVG export if stoke width is 1. Thicker stroke widths work fine.

- If fill is not solid, the fill value is replaced with an rgba call. Most programs can read this correctly, but apparently not NodeBox. Import fails to fill shapes with rgba function fills. SVGs with fill-opacity="0.25" in the code import the fill correctly but also apply that opacity to the outlines.

Might be easy to fix and is currently causing me some grief.

Thanks,

John

  1. Support Staff 1 Posted by Frederik De Ble... on 10 Jul, 2018 08:24 PM

    Frederik De Bleser's Avatar

    The SVG parser in NodeBox is a relic of the NodeBox 1 version, and has a number of known inaccuracies.

    Ideally I'd like to replace this by a more robust actual parser instead of the current mish-mash of regular expressions.

    I'm currently doing a big "modernization" push. This will also include NodeBox 3 and its SVG parser. I can't promise any quick results unfortunately...

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Already uploaded files

  • alpha_fill_screenshot.png 280 KB
  • svg_alpha_fill_bug.zip 2.23 KB

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

18 Nov, 2024 11:24 PM
18 Nov, 2024 09:01 PM
07 Nov, 2024 10:53 AM
02 Nov, 2024 11:22 AM
01 Nov, 2024 12:41 AM

 

01 Oct, 2024 07:59 AM
30 Sep, 2024 11:37 PM
30 Sep, 2024 11:11 AM
30 Sep, 2024 02:37 AM
28 Sep, 2024 10:33 AM
26 Sep, 2024 06:41 AM