MustDraw is like Draw, but panics on all errors.
(t terminalapi.Terminal, cvs *canvas.Canvas, meta *widgetapi.Meta, opts widgetapi.Options, events ...*Event)
| 189 | |
| 190 | // MustDraw is like Draw, but panics on all errors. |
| 191 | func MustDraw(t terminalapi.Terminal, cvs *canvas.Canvas, meta *widgetapi.Meta, opts widgetapi.Options, events ...*Event) { |
| 192 | if err := Draw(t, cvs, meta, opts, events...); err != nil { |
| 193 | panic(fmt.Sprintf("Draw => %v", err)) |
| 194 | } |
| 195 | } |
| 196 | |
| 197 | // DrawWithMirror is like Draw, but uses the provided Mirror instead of creating one. |
| 198 | func DrawWithMirror(mirror *Mirror, t terminalapi.Terminal, cvs *canvas.Canvas, meta *widgetapi.Meta, events ...*Event) error { |