Documentation
¶
Overview ¶
Package canvas defines the canvas that the widgets draw on.
Index ¶
- type Canvas
- func (c *Canvas) Apply(t terminalapi.Terminal) error
- func (c *Canvas) Area() image.Rectangle
- func (c *Canvas) Cell(p image.Point) (*cell.Cell, error)
- func (c *Canvas) Clear() error
- func (c *Canvas) CopyTo(dst *Canvas) error
- func (c *Canvas) SetCell(p image.Point, r rune, opts ...cell.Option) (int, error)
- func (c *Canvas) Size() image.Point
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Canvas ¶
type Canvas struct {
// contains filtered or unexported fields
}
Canvas is where a widget draws its output for display on the terminal.
func (*Canvas) Apply ¶
func (c *Canvas) Apply(t terminalapi.Terminal) error
Apply applies the canvas to the corresponding area of the terminal. Guarantees to stay within limits of the area the canvas was created with.
func (*Canvas) CopyTo ¶ added in v0.3.0
CopyTo copies the content of this canvas onto the destination canvas. This canvas can have an offset when compared to the destination canvas, i.e. the area of this canvas doesn't have to be zero-based.
func (*Canvas) SetCell ¶
SetCell sets the rune of the specified cell on the canvas. Returns the number of cells the rune occupies, wide runes can occupy multiple cells when printed on the terminal. See http://www.unicode.org/reports/tr11/. Use the options to specify which attributes to modify, if an attribute option isn't specified, the attribute retains its previous value.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package braille provides a canvas that uses braille characters.
|
Package braille provides a canvas that uses braille characters. |
|
testbraille
Package testbraille provides helpers for tests that use the braille package.
|
Package testbraille provides helpers for tests that use the braille package. |
|
Package testcanvas provides helpers for tests that use the canvas package.
|
Package testcanvas provides helpers for tests that use the canvas package. |