restorable: Fix comments

This commit is contained in:
Hajime Hoshi 2018-04-29 13:49:33 +09:00
parent 45afb6db67
commit 916c7aac8a

View File

@ -155,7 +155,8 @@ func (i *Image) ReplacePixels(pixels []byte, x, y, width, height int) {
} else { } else {
// There is not 'drawImageHistoryItem' for this image and dummyImage. // There is not 'drawImageHistoryItem' for this image and dummyImage.
// This means dummyImage might not be restored yet when this image is restored. // This means dummyImage might not be restored yet when this image is restored.
// However, that's ok since this image will be stale or have updated pixel data. // However, that's ok since this image will be stale or have updated pixel data
// and this image can be restored without dummyImage.
w, h := dummyImage.Size() w, h := dummyImage.Size()
geom := (*affine.GeoM)(nil).Scale(float64(width)/float64(w), float64(height)/float64(h)) geom := (*affine.GeoM)(nil).Scale(float64(width)/float64(w), float64(height)/float64(h))
geom = geom.Translate(float64(x), float64(y)) geom = geom.Translate(float64(x), float64(y))