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() mask.invert()
doAssert mask[0, 0] == 55 doAssert mask[0, 0] == 55
# block: block:
# let let
# mask = newMask(100, 100) mask = newMask(100, 100)
# r = 10.0 r = 10.0
# x = 10.0 x = 10.0
# y = 10.0 y = 10.0
# h = 80.0 h = 80.0
# w = 80.0 w = 80.0
# var path: Path var path: Path
# path.moveTo(x + r, y) path.moveTo(x + r, y)
# path.arcTo(x + w, y, x + w, y + h, r) # path.arcTo(x + w, y, x + w, y + h, r)
# path.arcTo(x + w, y + h, x, 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 + h, x, y, r)
# path.arcTo(x, y, x + w, 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: block:
let image = newImage(100, 100) let image = newImage(100, 100)