It is updateState(value, total, radius), like updateState(50, 100, 250) should give half a circle. It could be edited to remove radius param in our case.
This is the way I update the svg :
local function setProgress(value)
local svgXML = svgGetDocumentXML(mySvg) -- get xml
local path = xmlNodeGetChildren(svgXML, 1) -- get path node (second node, following first example I gave)
xmlNodeSetAttribute(path, "d", updateState(value, 100, 250)) -- editing the attribute
svgSetDocumentXML(mySvg, svgXML) -- saving
end
You could imagine a command to test it like :
local function startDemo()
local value = 0
setTimer(function()
value = value + 1
setProgress(value)
end, 10, 100)
end
addCommandHandler("demo", startDemo)
A little animation 0 to 100 % of the circle progress.