func (p *MyWidget) mouseReleaseEvent(e *ui.MouseEvent) { p.line = append(p.line, e.Pos()) p.lines = append(p.lines, p.line) p.line = []ui.Point{} p.Update() }
func (p *MyWidget) mouseMoveEvent(e *ui.MouseEvent) { p.line = append(p.line, e.Pos()) p.Update() }