Methods
__len
contours
moveTo and ending before the next
moveTo (or end of path). Use the next property on the returned
ContourMeasure to iterate through subsequent contours. Returns nil if the
path has no contours.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
__len__len() -> number
for i, command in ipairs(pathData) do
print(i, command.type)
end
local count = #pathData
print(count)
contourscontours() -> ContourMeasure?
moveTo and ending before the next
moveTo (or end of path). Use the next property on the returned
ContourMeasure to iterate through subsequent contours. Returns nil if the
path has no contours.
local contour = pathData:contours()
while contour do
print(contour.length)
contour = contour.next
end
measuremeasure() -> PathMeasure
local measure = pathData:measure()
print(measure.length)
Was this page helpful?