(dst draw.Image, text string, dx, dy int, c color.Color)
| 59 | } |
| 60 | |
| 61 | func DrawCenteredText(dst draw.Image, text string, dx, dy int, c color.Color) { |
| 62 | rows := WordWrap(text, 15) |
| 63 | for i, row := range rows { |
| 64 | x := 128 - len(row)*8 |
| 65 | y := 120 - len(rows)*12 + i*24 |
| 66 | DrawText(dst, x+dx, y+dy, row, c) |
| 67 | } |
| 68 | } |
| 69 | |
| 70 | func DrawCharacter(dst draw.Image, x, y int, ch byte, c color.Color) { |
| 71 | if ch < 32 || ch > 128 { |
no test coverage detected
searching dependent graphs…