Need to clear the color.
This commit is contained in:
parent
3e256ac97e
commit
b160fdf45c
1 changed files with 4 additions and 0 deletions
|
@ -241,6 +241,8 @@ proc drawBlend*(a: Image, b: Image, mat: Mat3, blendMode: BlendMode): Image =
|
||||||
if blendMode.allowCopy():
|
if blendMode.allowCopy():
|
||||||
var rgba = a.getRgbaUnsafe(x, y)
|
var rgba = a.getRgbaUnsafe(x, y)
|
||||||
result.setRgbaUnsafe(x, y, rgba)
|
result.setRgbaUnsafe(x, y, rgba)
|
||||||
|
else:
|
||||||
|
result.setRgbaUnsafe(x, y, rgba(0,0,0,0))
|
||||||
|
|
||||||
proc drawBlendSmooth*(a: Image, b: Image, mat: Mat3, blendMode: BlendMode): Image =
|
proc drawBlendSmooth*(a: Image, b: Image, mat: Mat3, blendMode: BlendMode): Image =
|
||||||
## Draws one image onto another using matrix with color blending.
|
## Draws one image onto another using matrix with color blending.
|
||||||
|
@ -263,6 +265,8 @@ proc drawBlendSmooth*(a: Image, b: Image, mat: Mat3, blendMode: BlendMode): Imag
|
||||||
if blendMode.allowCopy():
|
if blendMode.allowCopy():
|
||||||
var rgba = a.getRgbaUnsafe(x, y)
|
var rgba = a.getRgbaUnsafe(x, y)
|
||||||
result.setRgbaUnsafe(x, y, rgba)
|
result.setRgbaUnsafe(x, y, rgba)
|
||||||
|
else:
|
||||||
|
result.setRgbaUnsafe(x, y, rgba(0,0,0,0))
|
||||||
|
|
||||||
|
|
||||||
proc draw*(a: Image, b: Image, mat: Mat3, blendMode = bmNormal): Image =
|
proc draw*(a: Image, b: Image, mat: Mat3, blendMode = bmNormal): Image =
|
||||||
|
|
Loading…
Reference in a new issue