From 734c6f648d1648c337f117540fa86a7b11a27a2c Mon Sep 17 00:00:00 2001 From: Erik Bunn Date: Mon, 27 Jun 2022 14:17:50 +0200 Subject: [PATCH] added doc --- raster_renderer.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/raster_renderer.go b/raster_renderer.go index 595fe61..86c8e02 100644 --- a/raster_renderer.go +++ b/raster_renderer.go @@ -23,6 +23,8 @@ func PNG(width, height int) (Renderer, error) { return nil, err } +// InMemory returns an in-memory raster renderer that calls cb() with the +// rendered image upon completion. func InMemory(width, height int, cb func(image.Image)) (Renderer, error) { i := image.NewRGBA(image.Rect(0, 0, width, height)) gc, err := drawing.NewRasterGraphicContext(i)