mirror of
https://github.com/golang/go
synced 2024-11-12 00:50:24 -07: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:
parent
56c9f8e8cf
commit
b6ffefcf8f
@ -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))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user