go-chart/imager.go
Fredrik Wallgren b0cccfa7c7
Add possibility to render charts to image.Image
Add interface Imager for ToImage method.
Implement ToImage in rasterRenderer.
Implement ToImage in Chart, BarChart and PieChart.
2016-08-15 11:38:41 +02:00

10 lines
224 B
Go

package chart
import "image"
// Imager interface is implemented by renderers that want to expose the data
// as the image.Image interface.
type Imager interface {
// ToImage returns a image.Image
ToImage() image.Image
}