Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PTYRun ¶
func PTYRun(f PTYRunFunc, termCmd ...string) error
PTYRun starts a pseudo terminal and runs a function on its pty.
func TakeScreenshot ¶
func TakeScreenshot(termName string, termProvider TermProviderFunc, drawerName string, drawFuncProvider DrawFuncProvider, imgBytes []byte, cellBounds image.Rectangle, rsz term.Resizer) (image.Image, error)
TakeScreenshot ...
Types ¶
type DrawFunc ¶
type DrawFunc = func(tm *term.Terminal, dr term.Drawer, rsz term.Resizer, cpw, cph uint) (areaOfInterest image.Rectangle, scaleX, scaleY float64, e error)
DrawFunc returns the area that will be screenshot by TakeScreenshotFunc and the scale for unstretching a possibly contained image
type DrawFuncProvider ¶
type PTYRunFunc ¶
func TakeScreenshotFunc ¶
func TakeScreenshotFunc(termProvider TermProviderFunc, termChecker term.TermChecker, drawerName string, drawFunc DrawFunc, rsz term.Resizer, imgChan chan<- image.Image) PTYRunFunc
TakeScreenshotFunc displays an image in a pseudo-terminal and captures the displayed version for comparison.
Click to show internal directories.
Click to hide internal directories.