Use draw.Over in DrawImage
This commit is contained in:
parent
d4dd88993f
commit
5e6e015a82
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user