Invalidate#
func (invalidator *Invalidator) Invalidate()Invalidate requests one repaint on the window thread. It is safe to call from any goroutine and never blocks on the application.
API 文档由 Go 源码生成,内容为英文。
type Invalidator struct {
// contains filtered or unexported fields
}Invalidator lets background goroutines ask the window to repaint. Create one, pass it as Config.Invalidator, and call Invalidate from anywhere after the goroutine has published its result. It owns no goroutine, timer, or channel: an application that never calls Invalidate pays nothing, and the window thread is woken exactly once per call batch.
Calls made before RunCanvas starts or after the window closes do nothing. The zero value is ready to use.
Invalidate#func (invalidator *Invalidator) Invalidate()Invalidate requests one repaint on the window thread. It is safe to call from any goroutine and never blocks on the application.