add dragon2 test
This commit is contained in:
parent
8baa04a6cb
commit
5d0539bf9b
6 changed files with 1387 additions and 7 deletions
|
@ -151,12 +151,6 @@ proc decodeCtxInternal(inherited: Ctx, node: XmlNode): Ctx =
|
||||||
if opacity.len > 0:
|
if opacity.len > 0:
|
||||||
result.opacity = clamp(parseFloat(opacity), 0, 1)
|
result.opacity = clamp(parseFloat(opacity), 0, 1)
|
||||||
|
|
||||||
if fillOpacity.len > 0:
|
|
||||||
result.fill.opacity = clamp(parseFloat(fillOpacity), 0, 1)
|
|
||||||
|
|
||||||
if strokeOpacity.len > 0:
|
|
||||||
result.strokeOpacity = clamp(parseFloat(strokeOpacity), 0, 1)
|
|
||||||
|
|
||||||
if fillRule == "":
|
if fillRule == "":
|
||||||
discard # Inherit
|
discard # Inherit
|
||||||
elif fillRule == "nonzero":
|
elif fillRule == "nonzero":
|
||||||
|
@ -197,6 +191,12 @@ proc decodeCtxInternal(inherited: Ctx, node: XmlNode): Ctx =
|
||||||
result.stroke = parseHtmlColor(stroke).rgbx
|
result.stroke = parseHtmlColor(stroke).rgbx
|
||||||
result.shouldStroke = true
|
result.shouldStroke = true
|
||||||
|
|
||||||
|
if fillOpacity.len > 0:
|
||||||
|
result.fill.opacity = parseFloat(fillOpacity).clamp(0, 1)
|
||||||
|
|
||||||
|
if strokeOpacity.len > 0:
|
||||||
|
result.strokeOpacity = parseFloat(strokeOpacity).clamp(0, 1)
|
||||||
|
|
||||||
if strokeWidth == "":
|
if strokeWidth == "":
|
||||||
discard # Inherit
|
discard # Inherit
|
||||||
else:
|
else:
|
||||||
|
|
BIN
tests/fileformats/svg/diffs/dragon2.png
Normal file
BIN
tests/fileformats/svg/diffs/dragon2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 137 KiB |
1379
tests/fileformats/svg/dragon2.svg
Normal file
1379
tests/fileformats/svg/dragon2.svg
Normal file
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 705 KiB |
BIN
tests/fileformats/svg/masters/dragon2.png
Normal file
BIN
tests/fileformats/svg/masters/dragon2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 100 KiB |
BIN
tests/fileformats/svg/rendered/dragon2.png
Normal file
BIN
tests/fileformats/svg/rendered/dragon2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 183 KiB |
|
@ -13,7 +13,8 @@ const files = [
|
||||||
"Ghostscript_Tiger",
|
"Ghostscript_Tiger",
|
||||||
"scale",
|
"scale",
|
||||||
"miterlimit",
|
"miterlimit",
|
||||||
"dashes"
|
"dashes",
|
||||||
|
"dragon2"
|
||||||
]
|
]
|
||||||
|
|
||||||
proc doDiff(rendered: Image, name: string) =
|
proc doDiff(rendered: Image, name: string) =
|
||||||
|
|
Loading…
Reference in a new issue