Use draw.Over in DrawImage

This commit is contained in:
Michael Fogleman 2016-02-19 18:33:15 -05:00
parent d4dd88993f
commit 5e6e015a82

View File

@ -308,7 +308,7 @@ func (dc *Context) DrawCircle(x, y, r float64) {
func (dc *Context) DrawImage(im image.Image, x, y int) { func (dc *Context) DrawImage(im image.Image, x, y int) {
p := image.Pt(x, y) p := image.Pt(x, y)
r := image.Rectangle{p, p.Add(im.Bounds().Size())} r := image.Rectangle{p, p.Add(im.Bounds().Size())}
draw.Draw(dc.im, r, im, image.ZP, draw.Src) draw.Draw(dc.im, r, im, image.ZP, draw.Over)
} }
// Text Functions // Text Functions