Reading in SVG with background doesn't show background rect

I have a very simple SVG file that looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" width="1000" height="1000" viewBox="0 0 1000 1000">
  <rect width="1000" height="1000" fill="#693c3c"/>
  <g transform="translate(500,500)">
  <path d="M-50.00,-50.00 L50.00,-50.00 L50.00,50.00 L-50.00,50.00 Z" fill="#ffffff"/>
  </g>
</svg>

trying to import this into Acorn shows the white rectangle, but not the full-size background rectangle. Any idea why that happens?

Hello, and welcome.

The larger box isn’t showing up because there’s no x and y attribute for the rect, which I just found out tonight were optional!

I’ve got this fixed for the next release, thanks for pointing it out.

-gus

1 Like

The fix in up in the latest builds: https://flyingmeat.com/download/latest/

Try it out and let me know how it works for you.

-gus

1 Like

Just tested it and it works, thanks!