Skip to content

Commit 2e41f5f

Browse files
committed
image: Use Point and Rectangle zero values
1 parent 6d3d959 commit 2e41f5f

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

animation.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ func (a *Animation) EncodeGIF(w io.Writer) error {
7070
for i, src := range a.Frames {
7171
dst := image.NewPaletted(src.Bounds(), a.Palettes[i])
7272

73-
draw.Draw(dst, dst.Bounds(), src, image.ZP, draw.Src)
73+
draw.Draw(dst, dst.Bounds(), src, image.Point{}, draw.Src)
7474

7575
frames = append(frames, dst)
7676
delays = append(delays, a.Delay)

palette.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ func (p Palette) Random() color.NRGBA {
4040
func (p Palette) Tile(src image.Image) *Paletted {
4141
dst := NewPalettedImage(src.Bounds(), p)
4242

43-
draw.Draw(dst, dst.Bounds(), src, image.ZP, draw.Src)
43+
draw.Draw(dst, dst.Bounds(), src, image.Point{}, draw.Src)
4444

4545
return dst
4646
}

rect.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
)
1010

1111
// ZR is the zero image.Rectangle.
12-
var ZR = image.ZR
12+
var ZR = image.Rectangle{}
1313

1414
// Rect is a 2D rectangle aligned with the axes of the coordinate system. It is defined by two
1515
// points, Min and Max.

0 commit comments

Comments
 (0)