1
0
mirror of https://github.com/golang/go synced 2024-09-24 13:20:12 -06:00

image/draw: use image.Image type for dst in processBackwards

Type Image has an additional .Set method which is not required
in this case.
This commit is contained in:
Leon Klingele 2019-01-30 02:39:33 +01:00
parent 56c9f8e8cf
commit b6ffefcf8f
No known key found for this signature in database
GPG Key ID: 0C8AF48831EEC211

View File

@ -90,8 +90,8 @@ func clip(dst Image, r *image.Rectangle, src image.Image, sp *image.Point, mask
}
}
func processBackward(dst Image, r image.Rectangle, src image.Image, sp image.Point) bool {
return image.Image(dst) == src &&
func processBackward(dst image.Image, r image.Rectangle, src image.Image, sp image.Point) bool {
return dst == src &&
r.Overlaps(r.Add(sp.Sub(r.Min))) &&
(sp.Y < r.Min.Y || (sp.Y == r.Min.Y && sp.X < r.Min.X))
}