This commit is contained in:
Ryan Oldenburg 2022-06-12 23:10:41 -05:00
parent 2a8e631ed8
commit 550bec6117

View file

@ -1320,9 +1320,9 @@ proc clearUnsafe(target: Image | Mask, startX, startY, toX, toY: int) =
start = target.dataIndex(startX, startY)
len = target.dataIndex(toX, toY) - start
when type(target) is Image:
target.data.fillUnsafe(rgbx(0, 0, 0, 0), start, len)
fillUnsafe(target.data, rgbx(0, 0, 0, 0), start, len)
else: # target is Mask
target.data.fillUnsafe(0, start, len)
fillUnsafe(target.data, 0, start, len)
proc fillCoverage(
image: Image,