Upgrade to v2.7
Fyne API v2.7
app
canvas
container
data/binding
data/validation
dialog
driver
package driver
AndroidContext
AndroidContext
AndroidWindowContext
AndroidWindowContext
MacWindowContext
MacWindowContext
NativeWindow
NativeWindow
UnknownContext
UnknownContext
WaylandWindowContext
WaylandWindowContext
WindowsWindowContext
WindowsWindowContext
X11WindowContext
X11WindowContext
driver/desktop
package desktop
App
App
Canvas
Canvas
Cursor
Cursor
Cursorable
Cursorable
CustomShortcut
CustomShortcut
Driver
Driver
Hoverable
Hoverable
Keyable
Keyable
Modifier
Modifier
Mouseable
Mouseable
MouseButton
MouseButton
MouseEvent
MouseEvent
StandardCursor
StandardCursor
driver/embedded
package embedded
CharacterEvent
Driver
Event
KeyDirection
KeyEvent
TouchDownEvent
TouchMoveEvent
TouchUpEvent
driver/mobile
package mobile
Device
Device
Driver
Driver
Keyboardable
Keyboardable
KeyboardType
KeyboardType
Touchable
Touchable
TouchEvent
TouchEvent
driver/software
lang
layout
storage
storage/repository
test
theme
widget
Fyne API "software"
software
import "fyne.io/fyne/v2/driver/software"
Usage
func NewCanvas
func NewCanvas() test.WindowlessCanvas
NewCanvas creates a new canvas in memory that can render without hardware support.
func NewTransparentCanvas
func NewTransparentCanvas() test.WindowlessCanvas
NewTransparentCanvas creates a new canvas in memory that can render without hardware support without a background color.
Since:
2.2
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().