MCPcopy Create free account
hub / github.com/cogentcore/core / PathDataNextVector

Function PathDataNextVector

svg/path.go:228–235  ·  view source on GitHub ↗

PathDataNextVector gets the next 2 path data points as a vector

(data []PathData, i *int)

Source from the content-addressed store, hash-verified

226
227// PathDataNextVector gets the next 2 path data points as a vector
228func PathDataNextVector(data []PathData, i *int) math32.Vector2 {
229 v := math32.Vector2{}
230 v.X = float32(data[*i])
231 (*i)++
232 v.Y = float32(data[*i])
233 (*i)++
234 return v
235}
236
237// PathDataNextRel gets the next 2 path data points as a relative vector
238// and returns that relative vector added to current point

Callers 5

PathDataRenderFunction · 0.85
PathDataIterFuncFunction · 0.85
PathDataStringFunction · 0.85
PathDataTransformAbsFunction · 0.85
PathDataTransformRelFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected