Alter 2 files
Update `drawing.go` Update `imagegen.go`
This commit is contained in:
parent
2e9b8cdfb0
commit
e988d0b978
2 changed files with 3 additions and 3 deletions
|
@ -225,7 +225,7 @@ var weatherIcons = map[int]string{
|
|||
30: "\uf01e", // Thunder
|
||||
}
|
||||
|
||||
func drawTrains(ctx *canvas.Context, startFrom float64, services []string) (float64, error) {
|
||||
func drawTrains(ctx *canvas.Context, startFrom float64, location string, services []string) (float64, error) {
|
||||
cursorX := float64(0)
|
||||
cursorY := startFrom + 15
|
||||
startFrom += 15
|
||||
|
@ -249,7 +249,7 @@ func drawTrains(ctx *canvas.Context, startFrom float64, services []string) (floa
|
|||
ctx.DrawText(cursorX, cursorY, tl)
|
||||
|
||||
cursorX += bounds.W
|
||||
ctx.DrawText(cursorX, cursorY, canvas.NewTextLine(fontMonoLittleSubtitle, " at SLY", canvas.Left))
|
||||
ctx.DrawText(cursorX, cursorY, canvas.NewTextLine(fontMonoLittleSubtitle, " at " + location, canvas.Left))
|
||||
}
|
||||
|
||||
cursorY += bounds.H + 10
|
||||
|
|
|
@ -55,7 +55,7 @@ func Generate(conf *Config) ([]byte, error) {
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
bottom, err = drawTrains(ctx, bottom, trains)
|
||||
bottom, err = drawTrains(ctx, bottom, conf.TrainsLocation, trains)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
Reference in a new issue