b0cccfa7c7
Add interface Imager for ToImage method. Implement ToImage in rasterRenderer. Implement ToImage in Chart, BarChart and PieChart.
10 lines
224 B
Go
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
|
|
}
|