Home | History | Annotate | Download | only in draw

Lines Matching defs:Image

5 // Package draw provides image composition functions.
7 // See "The Go image/draw package" for an introduction to this package:
12 "image"
13 "image/color"
14 "image/internal/imageutil"
17 // m is the maximum color value returned by image.Color.RGBA.
20 // Image is an image.Image with a Set method to change a single pixel.
21 type Image interface {
22 image.Image
26 // Quantizer produces a palette for an image.
29 // updated palette suitable for converting m to a paletted image.
30 Quantize(p color.Palette, m image.Image) color.Palette
45 func (op Op) Draw(dst Image, r image.Rectangle, src image.Image, sp image.Point) {
46 DrawMask(dst, r, src, sp, nil, image.Point{}, op)
53 Draw(dst Image, r image.Rectangle, src image.Image, sp image.Point)
62 func (floydSteinberg) Draw(dst Image, r image.Rectangle, src image.Image, sp image.Point) {
70 // clip clips r against each image's bounds (after translating into the
71 // destination image's coordinate space) and shifts the points sp and mp by
73 func clip(dst Image, r *image.Rectangle, src image.Image, sp *image.Point, mask image.Image, mp *image.Point) {
93 func processBackward(dst Image, r image.Rectangle, src image.Image, sp image.Point) bool {
94 return image.Image(dst) == src &&
100 func Draw(dst Image, r image.Rectangle, src image.Image, sp image.Point, op Op) {
101 DrawMask(dst, r, src, sp, nil, image.Point{}, op)
106 func DrawMask(dst Image, r image.Rectangle, src image.Image, sp image.Point, mask image.Image, mp image.Point, op Op) {
114 case *image.RGBA:
118 case *image.Uniform:
126 case *image.RGBA:
129 case *image.NRGBA:
132 case *image.YCbCr:
133 // An image.YCbCr is always fully opaque, and so if the
135 // effectively always Src. Similarly for image.Gray and
136 // image.CMYK.
140 case *image.Gray:
143 case *image.CMYK:
147 } else if mask0, ok := mask.(*image.Alpha); ok {
149 case *image.Uniform:
157 case *image.Uniform:
161 case *image.RGBA:
164 case *image.NRGBA:
167 case *image.YCbCr:
171 case *image.Gray:
174 case *image.CMYK:
182 case *image.Paletted:
241 func drawFillOver(dst *image.RGBA, r image.Rectangle, sr, sg, sb, sa uint32) {
263 func drawFillSrc(dst *image.RGBA, r image.Rectangle, sr, sg, sb, sa uint32) {
287 func drawCopyOver(dst *image.RGBA, r image.Rectangle, src *image.RGBA, sp image.Point) {
335 func drawCopySrc(dst *image.RGBA, r image.Rectangle, src *image.RGBA, sp image.Point) {
361 func drawNRGBAOver(dst *image.RGBA, r image.Rectangle, src *image.NRGBA, sp image.Point) {
396 func drawNRGBASrc(dst *image.RGBA, r image.Rectangle, src *image.NRGBA, sp image.Point) {
423 func drawGray(dst *image.RGBA, r image.Rectangle, src *image.Gray, sp image.Point) {
445 func drawCMYK(dst *image.RGBA, r image.Rectangle, src *image.CMYK, sp image.Point) {
465 func drawGlyphOver(dst *image.RGBA, r image.Rectangle, src *image.Uniform, mask *image.Alpha, mp image.Point) {
497 func drawRGBA(dst *image.RGBA, r image.Rectangle, src image.Image, sp image.Point, mask image.Image, mp image.Point, op Op) {
500 if image.Image(dst) == src && r.Overlaps(r.Add(sp.Sub(r.Min))) {
576 func drawPaletted(dst Image, r image.Rectangle, src image.Image, sp image.Point, floydSteinberg bool) {
579 // walking the image backward (right-to-left bottom-to-top)?
581 // If dst is an *image.Paletted, we have a fast path for dst.Set and
583 // used by color.Palette's Index method in image/color/color.go, plus
586 if p, ok := dst.(*image.Paletted); ok {