绘制文字
(one *gg.Context, fontSize, drawX, rlineY float64, lineTexts []string)
| 382 | |
| 383 | // 绘制文字 |
| 384 | func (titlec *titleColor) drawsc(one *gg.Context, fontSize, drawX, rlineY float64, lineTexts []string) { |
| 385 | if titlec.isRandom { |
| 386 | titlec.randfill() |
| 387 | } |
| 388 | one.SetRGBA255(titlec.r, titlec.g, titlec.b, 85) |
| 389 | one.Fill() // 填充颜色 |
| 390 | one.SetRGBA255(55, 55, 55, 255) |
| 391 | h := fontSize + rlineY - 3 |
| 392 | for i := range lineTexts { // 逐行绘制文字 |
| 393 | one.DrawString(lineTexts[i], drawX+fontSize/2, h) |
| 394 | h += fontSize + (fontSize / 4) |
| 395 | } |
| 396 | } |
| 397 | |
| 398 | // 填充颜色 |
| 399 | func (titlec *titleColor) randfill() { |