| 170 | } |
| 171 | |
| 172 | func customrectangle(cw, ch, aw, ah, namew float64, rtgcolor color.Color) (img image.Image) { |
| 173 | canvas := gg.NewContext(int(cw), int(ch)) |
| 174 | sch := ch * 6 / 10 |
| 175 | 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) |
| 176 | canvas.SetColor(rtgcolor) |
| 177 | canvas.Fill() |
| 178 | canvas.DrawRoundedRectangle((ch-sch)/2/2, (ch-sch)/2/2-ah/4, aw/2+aw/40*5+namew, ah/2, 8) |
| 179 | canvas.Fill() |
| 180 | |
| 181 | img = canvas.Image() |
| 182 | return |
| 183 | } |
| 184 | |
| 185 | func customtext(a *scoredata, fontdata []byte, cw, ch, aw float64, textcolor color.Color) (img image.Image, err error) { |
| 186 | canvas := gg.NewContext(int(cw), int(ch)) |