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

Method Closed

path.go:247–249  ·  view source on GitHub ↗

Closed returns true if the last subpath of p is a closed path.

()

Source from the content-addressed store, hash-verified

245
246// Closed returns true if the last subpath of p is a closed path.
247func (p *Path) Closed() bool {
248 return 0 < len(p.d) && p.d[len(p.d)-1] == CloseCmd
249}
250
251// PointClosed returns true if the last subpath of p is a closed path and the close command is a point and not a line.
252func (p *Path) PointClosed() bool {

Callers 8

ToVectorRasterizerMethod · 0.95
AddPathEndpointsMethod · 0.45
SimplifyMethod · 0.45
DashMethod · 0.45
TestPathClosedFunction · 0.45
TestPathAndFunction · 0.45
TestPathOrFunction · 0.45
TestPathXorFunction · 0.45

Calls

no outgoing calls

Tested by 4

TestPathClosedFunction · 0.36
TestPathAndFunction · 0.36
TestPathOrFunction · 0.36
TestPathXorFunction · 0.36