MCPcopy
hub / github.com/mum4k/termdash / DiagonalCellOpts

Function DiagonalCellOpts

private/segdisp/segment/segment.go:385–389  ·  view source on GitHub ↗

DiagonalCellOpts sets options on the cells that contain the diagonal segment. Cell options on a braille canvas can only be set on the entire cell, not per pixel.

(cOpts ...cell.Option)

Source from the content-addressed store, hash-verified

383// Cell options on a braille canvas can only be set on the entire cell, not per
384// pixel.
385func DiagonalCellOpts(cOpts ...cell.Option) DiagonalOption {
386 return diagonalOption(func(opts *diagonalOptions) {
387 opts.cellOpts = cOpts
388 })
389}
390
391// Diagonal draws a diagonal segment of the specified width filling the area.
392func Diagonal(bc *braille.Canvas, ar image.Rectangle, width int, dt DiagonalType, opts ...DiagonalOption) error {

Callers 3

TestDrawFunction · 0.92
DrawMethod · 0.92
TestDiagonalFunction · 0.85

Calls 1

diagonalOptionFuncType · 0.85

Tested by 2

TestDrawFunction · 0.74
TestDiagonalFunction · 0.68