MCPcopy
hub / github.com/tdewolff/canvas / Append

Method Append

path.go:300–310  ·  view source on GitHub ↗

Append appends path q to p and returns the extended path p.

(qs ...*Path)

Source from the content-addressed store, hash-verified

298
299// Append appends path q to p and returns the extended path p.
300func (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.
313func (p *Path) Join(q *Path) *Path {

Callers 15

ParseLaTeXFunction · 0.95
fontDecorateFunction · 0.95
MergeMethod · 0.95
DashMethod · 0.95
DecorateMethod · 0.95
TileMethod · 0.95
NewShapeHatchFunction · 0.95
OffsetMethod · 0.95
StrokeMethod · 0.95
mainFunction · 0.95
bentleyOttmannFunction · 0.45
renderLineToMethod · 0.45

Calls 1

EmptyMethod · 0.95

Tested by 2

fontDecorateFunction · 0.76
TestPathAppendFunction · 0.36