go1.20.5
GoThrough

draw.Over

// Over specifies ``(src in mask) over dst''. const Over = iota

draw.Src

// Src specifies ``src in mask''. const Src = iota

draw.FloydSteinberg

// FloydSteinberg is a Drawer that is the Src Op with Floyd-Steinberg error // diffusion. var FloydSteinberg = floydSteinberg{}

draw.Drawer

// Drawer contains the Draw method. type Drawer interface { // Draw aligns r.Min in dst with sp in src and then replaces the // rectangle r in dst with the result of drawing src on dst. Draw(dst Image, r image.Rectangle, src image.Image, sp image.Point) }

draw.Image

// Image is an image.Image with a Set method to change a single pixel. type Image interface { image.Image Set(x int, y int, c color.Color) }

draw.Quantizer

// Quantizer produces a palette for an image. type Quantizer interface { // Quantize appends up to cap(p) - len(p) colors to p and returns the // updated palette suitable for converting m to a paletted image. Quantize(p color.Palette, m image.Image) color.Palette }

draw.RGBA64Image

// 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 int, y int, c color.Color) SetRGBA64(x int, y int, c color.RGBA64) }

draw.Draw

// Draw calls DrawMask with a nil mask. func Draw(dst Image, r image.Rectangle, src image.Image, sp image.Point, op Op)

draw.DrawMask

// DrawMask aligns r.Min in dst with sp in src and mp in mask and then replaces the rectangle r // in dst with the result of a Porter-Duff composition. A nil mask is treated as opaque. func DrawMask(dst Image, r image.Rectangle, src image.Image, sp image.Point, mask image.Image, mp image.Point, op Op)