diff options
Diffstat (limited to 'libgo/go/image/draw/draw.go')
-rw-r--r-- | libgo/go/image/draw/draw.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libgo/go/image/draw/draw.go b/libgo/go/image/draw/draw.go index 8f96aa2..13f6668 100644 --- a/libgo/go/image/draw/draw.go +++ b/libgo/go/image/draw/draw.go @@ -23,6 +23,16 @@ type Image interface { Set(x, y int, c color.Color) } +// 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 interface { + image.RGBA64Image + Set(x, y int, c color.Color) + SetRGBA64(x, y int, c color.RGBA64) +} + // Quantizer produces a palette for an image. type Quantizer interface { // Quantize appends up to cap(p) - len(p) colors to p and returns the |