From dfc9eeaaec249f8a2092bd6f79004026eca2461f Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Mon, 21 Mar 2022 05:40:13 +0900 Subject: [PATCH] internal/restorable: bug fix: the parameter mask was not passed correctly --- internal/restorable/image.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/restorable/image.go b/internal/restorable/image.go index 13b8c5873..7117593b1 100644 --- a/internal/restorable/image.go +++ b/internal/restorable/image.go @@ -304,7 +304,7 @@ func (i *Image) ReplacePixels(pixels []byte, mask []byte, x, y, width, height in theImages.makeStaleIfDependingOn(i) if pixels != nil { - i.image.ReplacePixels(pixels, nil, x, y, width, height) + i.image.ReplacePixels(pixels, mask, x, y, width, height) } else { // TODO: When pixels == nil, we don't have to care the pixel state there. In such cases, the image // accepts only ReplacePixels and not Fill or DrawTriangles.