This commit is contained in:
Ryan Oldenburg 2022-07-07 16:14:04 -05:00
parent 7401ceb3d1
commit 06005de85c

View file

@ -89,8 +89,8 @@ proc fillUnsafe*(
if rgbx.r == rgbx.g and rgbx.r == rgbx.b and rgbx.r == rgbx.a: if rgbx.r == rgbx.g and rgbx.r == rgbx.b and rgbx.r == rgbx.a:
nimSetMem(data[start].addr, rgbx.r.cint, len * 4) nimSetMem(data[start].addr, rgbx.r.cint, len * 4)
else: else:
for color in data.mitems: for i in start ..< start + len:
color = rgbx data[i] = rgbx
const straightAlphaTable = block: const straightAlphaTable = block:
var table: array[256, array[256, uint8]] var table: array[256, array[256, uint8]]