Documentation ¶
Index ¶
- Variables
- func Clean(canvasRefreshed bool)
- func CleanCanvas(canvas fyne.Canvas)
- func CleanCanvases(refreshingCanvases []fyne.Canvas)
- func DeleteTexture(obj fyne.CanvasObject)
- func DestroyRenderer(wid fyne.Widget)
- func GetCanvasForObject(obj fyne.CanvasObject) fyne.Canvas
- func GetFontMetrics(text string, fontSize float32, style fyne.TextStyle) (size fyne.Size, base float32)
- func GetSvg(name string, w int, h int) *image.NRGBA
- func IsRendered(wid fyne.Widget) bool
- func IsValid(texture TextureType) bool
- func RangeExpiredTexturesFor(canvas fyne.Canvas, f func(fyne.CanvasObject))
- func RangeTexturesFor(canvas fyne.Canvas, f func(fyne.CanvasObject))
- func Renderer(wid fyne.Widget) fyne.WidgetRenderer
- func ResetThemeCaches()
- func SetCanvasForObject(obj fyne.CanvasObject, c fyne.Canvas, setup func())
- func SetFontMetrics(text string, fontSize float32, style fyne.TextStyle, size fyne.Size, ...)
- func SetSvg(name string, pix *image.NRGBA, w int, h int)
- func SetTexture(obj fyne.CanvasObject, texture TextureType, canvas fyne.Canvas)
- type TextureType
Constants ¶
This section is empty.
Variables ¶
var NoTexture = TextureType(0)
NoTexture used when there is no valid texture
Functions ¶
func Clean ¶
func Clean(canvasRefreshed bool)
Clean run cache clean task, it should be called on paint events.
func CleanCanvas ¶
func CleanCanvas(canvas fyne.Canvas)
CleanCanvas performs a complete remove of all the objects that belong to the specified canvas. Usually used to free all objects from a closing windows.
func CleanCanvases ¶
func CleanCanvases(refreshingCanvases []fyne.Canvas)
CleanCanvases runs cache clean tasks for canvases that are being refreshed. This is called on paint events.
func DeleteTexture ¶
func DeleteTexture(obj fyne.CanvasObject)
DeleteTexture deletes the texture from the cache map.
func DestroyRenderer ¶
func DestroyRenderer(wid fyne.Widget)
DestroyRenderer frees a render implementation for a widget. This is typically for internal use only.
func GetCanvasForObject ¶
func GetCanvasForObject(obj fyne.CanvasObject) fyne.Canvas
GetCanvasForObject returns the canvas for the specified object.
func GetFontMetrics ¶
func GetFontMetrics(text string, fontSize float32, style fyne.TextStyle) (size fyne.Size, base float32)
GetFontMetrics looks up a calculated size and baseline required for the specified text parameters.
func IsRendered ¶
func IsRendered(wid fyne.Widget) bool
IsRendered returns true of the widget currently has a renderer. One will be created the first time a widget is shown but may be removed after it is hidden.
func IsValid ¶
func IsValid(texture TextureType) bool
IsValid will return true if the passed texture is potentially a texture
func RangeExpiredTexturesFor ¶
func RangeExpiredTexturesFor(canvas fyne.Canvas, f func(fyne.CanvasObject))
RangeExpiredTexturesFor range over the expired textures for the specified canvas.
Note: If this is used to free textures, then it should be called inside a current gl context to ensure textures are deleted from gl.
func RangeTexturesFor ¶
func RangeTexturesFor(canvas fyne.Canvas, f func(fyne.CanvasObject))
RangeTexturesFor range over the textures for the specified canvas.
Note: If this is used to free textures, then it should be called inside a current gl context to ensure textures are deleted from gl.
func Renderer ¶
func Renderer(wid fyne.Widget) fyne.WidgetRenderer
Renderer looks up the render implementation for a widget
func ResetThemeCaches ¶
func ResetThemeCaches()
ResetThemeCaches clears all the svg and text size cache maps
func SetCanvasForObject ¶
func SetCanvasForObject(obj fyne.CanvasObject, c fyne.Canvas, setup func())
SetCanvasForObject sets the canvas for the specified object. The passed function will be called if the item was not previously attached to this canvas
func SetFontMetrics ¶
func SetFontMetrics(text string, fontSize float32, style fyne.TextStyle, size fyne.Size, base float32)
SetFontMetrics stores a calculated font size and baseline for parameters that were missing from the cache.
func SetTexture ¶
func SetTexture(obj fyne.CanvasObject, texture TextureType, canvas fyne.Canvas)
SetTexture sets cached texture.
Types ¶
type TextureType ¶
type TextureType = uint32
TextureType represents an uploaded GL texture
func GetTexture ¶
func GetTexture(obj fyne.CanvasObject) (TextureType, bool)
GetTexture gets cached texture.