code: func (a *Application) draw() *Application {
  	a.Lock()
  	defer a.Unlock()
  
  	screen := a.screen
  	root := a.root
  	fullscreen := a.rootFullscreen
  	before := a.beforeDraw
  	after := a.afterDraw
  
  	// Maybe we're not ready yet or not anymore.
  	if screen == nil || root == nil {
  		return a
  	}
  
  	// Resize if requested.
  	if fullscreen && root != nil {
  		width, height := screen.Size()
  		root.SetRect(0, 0, width, height)
  	}
  
  	// Call before handler if there is one.
  	if before != nil {
  		if before(screen) {
  			screen.Show()
  			return a
  		}
  	}
  
  	// Draw all primitives.
  	root.Draw(screen)
  
  	// Call after handler if there is one.
  	if after != nil {
  		after(screen)
  	}
  
  	// Sync screen.
  	screen.Show()
  
  	return a
  }
docs: // draw actually does what Draw() promises to do.