map-dots/imaging/generate.go

22 lines
487 B
Go

package imaging
import (
"fmt"
"image"
"git.fjla.uk/fred.boniface/map-dots/data"
"git.fjla.uk/fred.boniface/map-dots/log"
)
func Generate(height, width int, style string, data []data.LocationData) image.Image {
log.Msg.Debug("Image generation request: " + fmt.Sprint(width) + "x" + fmt.Sprint(height) + " " + style)
img := createCanvas(width, height)
switch style {
case "circle":
log.Msg.Debug("Selected style is circles")
mapCirclesToCanvas(img, data)
}
return img
}