testcanvas

package
v0.7.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 24, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package testcanvas provides helpers for tests that use the canvas package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MustApply

func MustApply(c *canvas.Canvas, t *faketerm.Terminal)

MustApply applies the canvas on the terminal or panics.

func MustCell

func MustCell(c *canvas.Canvas, p image.Point) *buffer.Cell

MustCell returns the cell or panics.

func MustCopyTo

func MustCopyTo(src, dst *canvas.Canvas)

MustCopyTo copies the content of the source canvas onto the destination canvas or panics.

func MustNew

func MustNew(area image.Rectangle) *canvas.Canvas

MustNew returns a new canvas or panics.

func MustSetAreaCells

func MustSetAreaCells(c *canvas.Canvas, cellArea image.Rectangle, r rune, opts ...cell.Option)

MustSetAreaCells sets the cells in the area or panics.

func MustSetCell

func MustSetCell(c *canvas.Canvas, p image.Point, r rune, opts ...cell.Option) int

MustSetCell sets the cell value or panics. 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/.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL