MustHV draws the segment or panics.
(bc *braille.Canvas, ar image.Rectangle, st segment.Type, opts ...segment.Option)
| 25 | |
| 26 | // MustHV draws the segment or panics. |
| 27 | func MustHV(bc *braille.Canvas, ar image.Rectangle, st segment.Type, opts ...segment.Option) { |
| 28 | if err := segment.HV(bc, ar, st, opts...); err != nil { |
| 29 | panic(fmt.Sprintf("segment.HV => unexpected error: %v", err)) |
| 30 | } |
| 31 | } |
| 32 | |
| 33 | // MustDiagonal draws the segment or panics. |
| 34 | func MustDiagonal(bc *braille.Canvas, ar image.Rectangle, width int, dt segment.DiagonalType, opts ...segment.DiagonalOption) { |