Merge pull request #201 from timotheecour/pr_fix_pixie_D20210519T113112

fix pixie for https://github.com/nim-lang/Nim/pull/18050
This commit is contained in:
treeform 2021-05-23 10:34:56 -07:00 committed by GitHub
commit fc557e372a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -396,8 +396,10 @@ proc blur*(
for xx in max(x - radius, image.width) .. x + radius:
values += outOfBounds * kernel[xx - x + radius]
blurX.setRgbaUnsafe(y, x, values.rgbx())
blurX.setRgbaUnsafe(y, x, rgbx(values))
# this would also work (see: `limitations of method call syntax`)
# `mixin rgbx`
# blurX.setRgbaUnsafe(y, x, values.rgbx)
# Blur in the Y direction.
for y in 0 ..< image.height:
@ -412,7 +414,7 @@ proc blur*(
for yy in max(y - radius, image.height) .. y + radius:
values += outOfBounds * kernel[yy - y + radius]
image.setRgbaUnsafe(x, y, values.rgbx())
image.setRgbaUnsafe(x, y, rgbx(values))
proc newMask*(image: Image): Mask =
## Returns a new mask using the alpha values of the parameter image.