On this page
test.WindowlessCanvas
import "fyne.io/fyne/v2/test"Usage
type WindowlessCanvas
type WindowlessCanvas interface {
fyne.Canvas
Padded() bool
Resize(fyne.Size)
SetPadded(bool)
SetScale(float32)
}WindowlessCanvas provides functionality for a canvas to operate without a window
func NewCanvas
func NewCanvas() WindowlessCanvasNewCanvas returns a single use in-memory canvas used for testing. This canvas has no painter so calls to Capture() will return a blank image.
func NewCanvasWithPainter
func NewCanvasWithPainter(painter SoftwarePainter) WindowlessCanvasNewCanvasWithPainter allows creation of an in-memory canvas with a specific painter. The painter will be used to render in the Capture() call.
func NewTransparentCanvasWithPainter
func NewTransparentCanvasWithPainter(painter SoftwarePainter) WindowlessCanvasNewTransparentCanvasWithPainter allows creation of an in-memory canvas with a specific painter without a background color. The painter will be used to render in the Capture() call.
Since:
2.2