mirror of https://github.com/mum4k/termdash.git
Defining API for canvas methods that set cell options.
This commit is contained in:
parent
a16d908b5e
commit
dd2d740abb
|
@ -16,6 +16,7 @@
|
|||
package canvas
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"image"
|
||||
|
||||
|
@ -94,6 +95,20 @@ func (c *Canvas) Cell(p image.Point) (*cell.Cell, error) {
|
|||
return c.buffer[p.X][p.Y].Copy(), nil
|
||||
}
|
||||
|
||||
// SetCellOpts sets options on the specified cell of the canvas without
|
||||
// modifying the content of the cell.
|
||||
// Sets the default cell options if no options are provided.
|
||||
// This method is idempotent.
|
||||
func (c *Canvas) SetCellOpts(p image.Point, opts ...cell.Option) error {
|
||||
return errors.New("unimplemented")
|
||||
}
|
||||
|
||||
// SetAreaCellOpts is like SetCellOpts, but sets the specified options on all
|
||||
// the cells within the provided area.
|
||||
func (c *Canvas) SetAreaCellOpts(cellArea image.Rectangle, opts ...cell.Option) error {
|
||||
return errors.New("unimplemented")
|
||||
}
|
||||
|
||||
// setCellFunc is a function that sets cell content on a terminal or a canvas.
|
||||
type setCellFunc func(image.Point, rune, ...cell.Option) error
|
||||
|
||||
|
|
Loading…
Reference in New Issue