MustBorder draws border on the canvas or panics.
(c *canvas.Canvas, border image.Rectangle, opts ...draw.BorderOption)
| 26 | |
| 27 | // MustBorder draws border on the canvas or panics. |
| 28 | func MustBorder(c *canvas.Canvas, border image.Rectangle, opts ...draw.BorderOption) { |
| 29 | if err := draw.Border(c, border, opts...); err != nil { |
| 30 | panic(fmt.Sprintf("draw.Border => unexpected error: %v", err)) |
| 31 | } |
| 32 | } |
| 33 | |
| 34 | // MustText draws the text on the canvas or panics. |
| 35 | func MustText(c *canvas.Canvas, text string, start image.Point, opts ...draw.TextOption) { |