Append appends path q to p and returns the extended path p.
(qs ...*Path)
| 298 | |
| 299 | // Append appends path q to p and returns the extended path p. |
| 300 | func (p *Path) Append(qs ...*Path) *Path { |
| 301 | if p.Empty() { |
| 302 | p = &Path{} |
| 303 | } |
| 304 | for _, q := range qs { |
| 305 | if !q.Empty() { |
| 306 | p.d = append(p.d, q.d...) |
| 307 | } |
| 308 | } |
| 309 | return p |
| 310 | } |
| 311 | |
| 312 | // Join joins path q to p and returns the extended path p (or q if p is empty). It's like executing the commands in q to p in sequence, where if the first MoveTo of q doesn't coincide with p, or if p ends in Close, it will fallback to appending the paths. |
| 313 | func (p *Path) Join(q *Path) *Path { |