pixie/experiments/test_svg_cairo.nim
Ryan Oldenburg f2b3c67d4b morepretty
2021-02-16 00:35:36 -06:00

23 lines
455 B
Nim

import pixie, strformat, svg_cairo
const files = [
"line01",
"polyline01",
"polygon01",
"rect01",
"rect02",
"circle01",
"ellipse01",
"triangle01",
"quad01",
"Ghostscript_Tiger"
]
for file in files:
let
original = readFile(&"tests/images/svg/{file}.svg")
image = decodeSvg(original)
gold = readImage(&"tests/images/svg/{file}.png")
# doAssert image.data == gold.data
image.writeFile(&"tests/images/svg/{file}.png")