restore test

This commit is contained in:
Ryan Oldenburg 2021-06-18 15:36:00 -05:00
parent f72fff8651
commit 280089b1b3
2 changed files with 15 additions and 14 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 269 B

After

Width:  |  Height:  |  Size: 270 B

View file

@ -13,27 +13,28 @@ block:
mask.invert()
doAssert mask[0, 0] == 55
# block:
# let
# mask = newMask(100, 100)
# r = 10.0
# x = 10.0
# y = 10.0
# h = 80.0
# w = 80.0
# var path: Path
# path.moveTo(x + r, y)
block:
let
mask = newMask(100, 100)
r = 10.0
x = 10.0
y = 10.0
h = 80.0
w = 80.0
var path: Path
path.moveTo(x + r, y)
# path.arcTo(x + w, y, x + w, y + h, r)
# path.arcTo(x + w, y + h, x, y + h, r)
# path.arcTo(x, y + h, x, y, r)
# path.arcTo(x, y, x + w, y, r)
# mask.fillPath(path)
path.roundedRect(x, y, w, h, r, r, r, r)
mask.fillPath(path)
# let minified = mask.minifyBy2()
let minified = mask.minifyBy2()
# doAssert minified.width == 50 and minified.height == 50
doAssert minified.width == 50 and minified.height == 50
# writeFile("tests/images/masks/maskMinified.png", minified.encodePng())
writeFile("tests/images/masks/maskMinified.png", minified.encodePng())
block:
let image = newImage(100, 100)