(attrs string)
| 40 | } |
| 41 | |
| 42 | func (p *Polygon) SVG(attrs string) string { |
| 43 | ret := fmt.Sprintf( |
| 44 | "<polygon %s points=\"", |
| 45 | attrs) |
| 46 | points := make([]string, len(p.X)) |
| 47 | for i := 0; i < len(p.X); i++ { |
| 48 | points[i] = fmt.Sprintf("%f,%f", p.X[i], p.Y[i]) |
| 49 | } |
| 50 | |
| 51 | return ret + strings.Join(points, ",") + "\" />" |
| 52 | } |
| 53 | |
| 54 | func (p *Polygon) Copy() Shape { |
| 55 | a := *p |
nothing calls this directly
no outgoing calls
no test coverage detected