The new NodeBox forum is live! Everything from support.nodebox.net moved here: sign in with the same email to pick up your old posts. Something not working? Write to forum-support@nodebox.net.

NodeBox 3From the old forum

SVG Import Bug

1 reply Last reply

  1. 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

    Copy link
  2. NodeBox team

    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...

    Copy link

Know something that helps?

Sign in with your email address to reply. No password needed.

Sign in to reply