git.lucas.co / go_mono
git clone https://git.lucas.co/go_mono.git

commit491771c681427e82b9843267b24b32cf56743e83
parent4aa0222fac
authorDmitri Shuralyov <dmitshur@golang.org>
date2023-09-07 23:48
draw: merge draw_go117.go into draw.go

This can be done as Go 1.21 and 1.20 are the supported
versions by now, and Go 1.16 is long since unsupported.

Change-Id: Ib90f796d6c38dbb9ffd99d56faf344ee9784f9bc
Reviewed-on: https://go-review.googlesource.com/c/image/+/526896
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Nigel Tao (INACTIVE; USE @golang.org INSTEAD) <nigeltao@google.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Nigel Tao <nigeltao@golang.org>

 draw/draw.go       |  6 ++++++
 draw/draw_go117.go | 26 --------------------------
 2 files changed, 6 insertions(+), 26 deletions(-)

diff --git a/draw/draw.go b/draw/draw.go
index cd5aaba..42d5d7e 100644
--- a/draw/draw.go
+++ b/draw/draw.go
@@ -47,6 +47,12 @@ func (floydSteinberg) Draw(dst Image, r image.Rectangle, src image.Image, sp ima
 // Image is an image.Image with a Set method to change a single pixel.
 type Image = draw.Image
 
+// RGBA64Image extends both the Image and image.RGBA64Image interfaces with a
+// SetRGBA64 method to change a single pixel. SetRGBA64 is equivalent to
+// calling Set, but it can avoid allocations from converting concrete color
+// types to the color.Color interface type.
+type RGBA64Image = draw.RGBA64Image
+
 // Op is a Porter-Duff compositing operator.
 type Op = draw.Op
 
diff --git a/draw/draw_go117.go b/draw/draw_go117.go
deleted file mode 100644
index 2e97caa..0000000
--- a/draw/draw_go117.go
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright 2021 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-//go:build go1.17
-
-package draw
-
-import (
-	"image/draw"
-)
-
-// The package documentation, in draw.go, gives the intent of this package:
-//
-//     This package is a superset of and a drop-in replacement for the
-//     image/draw package in the standard library.
-//
-// "Drop-in replacement" means that we use type aliases in this file.
-//
-// TODO: move the type aliases to draw.go once Go 1.16 is no longer supported.
-
-// RGBA64Image extends both the Image and image.RGBA64Image interfaces with a
-// SetRGBA64 method to change a single pixel. SetRGBA64 is equivalent to
-// calling Set, but it can avoid allocations from converting concrete color
-// types to the color.Color interface type.
-type RGBA64Image = draw.RGBA64Image