| 412 | } |
| 413 | |
| 414 | func customrectangle(cw, ch, aw, ah, namew float64, rtgcolor color.Color) (img image.Image) { |
| 415 | canvas := gg.NewContext(int(cw), int(ch)) |
| 416 | sch := ch * 6 / 10 |
| 417 | canvas.DrawRoundedRectangle((ch-sch)/2/2-aw/2-aw/40, (ch-sch)/2/2-aw/2-ah/40, aw+aw/40*2, ah+ah/40*2, 8) |
| 418 | canvas.SetColor(rtgcolor) |
| 419 | canvas.Fill() |
| 420 | canvas.DrawRoundedRectangle((ch-sch)/2/2, (ch-sch)/2/2-ah/4, aw/2+aw/40*5+namew, ah/2, 8) |
| 421 | canvas.Fill() |
| 422 | |
| 423 | img = canvas.Image() |
| 424 | return |
| 425 | } |
| 426 | |
| 427 | func customtext(a *scdata, fontdata []byte, cw, ch, aw float64, textcolor color.Color) (img image.Image, err error) { |
| 428 | canvas := gg.NewContext(int(cw), int(ch)) |