fix pixie for https://github.com/nim-lang/Nim/pull/18050
This commit is contained in:
parent
88a75ec2b2
commit
1ec7cefda2
1 changed files with 5 additions and 3 deletions
|
@ -396,8 +396,10 @@ proc blur*(
|
||||||
|
|
||||||
for xx in max(x - radius, image.width) .. x + radius:
|
for xx in max(x - radius, image.width) .. x + radius:
|
||||||
values += outOfBounds * kernel[xx - x + radius]
|
values += outOfBounds * kernel[xx - x + radius]
|
||||||
|
blurX.setRgbaUnsafe(y, x, rgbx(values))
|
||||||
blurX.setRgbaUnsafe(y, x, values.rgbx())
|
# this would also work (see: `limitations of method call syntax`)
|
||||||
|
# `mixin rgbx`
|
||||||
|
# blurX.setRgbaUnsafe(y, x, values.rgbx)
|
||||||
|
|
||||||
# Blur in the Y direction.
|
# Blur in the Y direction.
|
||||||
for y in 0 ..< image.height:
|
for y in 0 ..< image.height:
|
||||||
|
@ -412,7 +414,7 @@ proc blur*(
|
||||||
for yy in max(y - radius, image.height) .. y + radius:
|
for yy in max(y - radius, image.height) .. y + radius:
|
||||||
values += outOfBounds * kernel[yy - 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 =
|
proc newMask*(image: Image): Mask =
|
||||||
## Returns a new mask using the alpha values of the parameter image.
|
## Returns a new mask using the alpha values of the parameter image.
|
||||||
|
|
Loading…
Reference in a new issue