From 480aab5c1c7d0fc7e24230f7a9c7f1d9f21b2f58 Mon Sep 17 00:00:00 2001 From: Michael Fogleman Date: Fri, 19 Feb 2016 19:45:57 -0500 Subject: [PATCH] gopher --- examples/ellipse.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/examples/ellipse.go b/examples/ellipse.go index 589e53d..abe6518 100644 --- a/examples/ellipse.go +++ b/examples/ellipse.go @@ -13,5 +13,10 @@ func main() { dc.Fill() dc.Pop() } + if im, err := gg.LoadPNG("examples/gopher.png"); err == nil { + w := im.Bounds().Size().X + h := im.Bounds().Size().Y + dc.DrawImage(im, S/2-w/2, S/2-h/2) + } dc.SavePNG("out.png") }