rx icon indicating copy to clipboard operation
rx copied to clipboard

SVG output bug?

Open Euphrasiologist opened this issue 2 years ago • 1 comments

So I want to export my pixel art as a SVG. I used

:export @10x test.svg

But inspecting the SVG there is no output. I think the y-scaling is off? I believe this line:

https://github.com/cloudhead/rx/blob/e0da197e8c20dbfcf7eff05f715c8925e880c5af/src/view/resource.rs#L302

To be the source of the issue? I replaced this line with:

...
fn round_down(num: u32, divisor: u32) -> u32 {
                num - (num % divisor)
            }

let y = round_down((i as u32 / h), scale);
...

It's not quite right (some of the pixels I was exporting jump around), but perhaps along the right lines...

Euphrasiologist avatar Apr 05 '22 15:04 Euphrasiologist

Have you tried exporting at 1x?

cloudhead avatar Jun 03 '22 19:06 cloudhead

Should be fixed in 1bcbe90527ad0bb89c99cec40667f6b961ec8d9e

cloudhead avatar Nov 25 '23 11:11 cloudhead