From 6680b4f8d519af30cf0499082f2d6a61491ebc76 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Thu, 5 Apr 2018 01:07:36 +0900 Subject: [PATCH] shareable: Bug fix: wrong source image rect in ensureNotShared --- internal/shareable/shareable.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/shareable/shareable.go b/internal/shareable/shareable.go index 66da7e2cb..953e31ce8 100644 --- a/internal/shareable/shareable.go +++ b/internal/shareable/shareable.go @@ -94,7 +94,7 @@ func (s *Image) ensureNotShared() { x, y, w, h := s.region() newImg := restorable.NewImage(w, h, false) - newImg.DrawImage(s.backend.restorable, x, y, w, h, nil, nil, opengl.CompositeModeCopy, graphics.FilterNearest) + newImg.DrawImage(s.backend.restorable, x, y, x+w, y+h, nil, nil, opengl.CompositeModeCopy, graphics.FilterNearest) s.dispose() s.backend = &backend{