software

package
v0.0.0-...-4500097 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2026 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Overview

Package software implements a more generic system for just rendering without a window. Primarily, it was used in tests but found to be useful elsewhere. Between embedded and test utilities this may not be needed any more.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Render

func Render(obj fyne.CanvasObject, t fyne.Theme) image.Image

Render takes a canvas object and renders it to a regular Go image using the provided Theme. The returned image will be set to the object's minimum size. Use the theme.LightTheme() or theme.DarkTheme() to access the builtin themes.

func RenderCanvas

func RenderCanvas(c fyne.Canvas, t fyne.Theme) image.Image

RenderCanvas takes a canvas and renders it to a regular Go image using the provided Theme. This is the same as setting the application theme and then calling Canvas.Capture().

Types

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

Since: 2.9

func NewCanvas

func NewCanvas() WindowlessCanvas

NewCanvas creates a new canvas in memory that can render without hardware support.

func NewCanvasWithPainter

func NewCanvasWithPainter(painter driver.Painter) WindowlessCanvas

NewCanvasWithPainter creates a new canvas in memory that can render without hardware support which uses the given driver.Painter for #Capture().

Since: 2.8

func NewTransparentCanvas

func NewTransparentCanvas() WindowlessCanvas

NewTransparentCanvas creates a new canvas in memory that can render without hardware support without a background color.

Since: 2.2

func NewTransparentCanvasWithPainter

func NewTransparentCanvasWithPainter(painter driver.Painter) WindowlessCanvas

NewTransparentCanvasWithPainter creates a new canvas in memory that can render without hardware support which uses the given driver.Painter for #Capture() without a background color.

Since: 2.8

Jump to

Keyboard shortcuts

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