func (p *Path) draw(gc *gg.Context, trans *transformer) { if len(p.Positions) <= 1 { return } gc.ClearPath() gc.SetLineWidth(p.Weight) gc.SetLineCap(gg.LineCapRound) gc.SetLineJoin(gg.LineJoinRound) for _, ll := range p.Positions { gc.LineTo(trans.ll2p(ll)) } gc.SetColor(p.Color) gc.Stroke() }