It looks like you're new here. If you want to get involved, click one of these buttons!
local p=Path2D.new() local ms="MLLLLZ" local mp={0,0, 100,0, 100,100, 0,100, 0,0} p:setPath(ms,mp) p:setLineThickness(5) p:setPosition(100,100) stage:addChild(p) print(p:getWidth()) -- Returns: 0 |
Comments
Likes: antix, totebo
If you need a coordinate for each "instruction", why does this work:
For instructions and coordinates: coordinates count must match exactly what the instructions need. M and L need one coordinate, but Z doesn't need any. Here is a quick summary:
- M,L: 2 values (x,y)
- Q: 4 values (cx,cy,x,y)
- C: 6 values (c0x,c0y,c1x,c1y,x,y)
- Z: 0 values
- H,V: 1 value (x or y)
- A: 7 values (r1,r2,angle,largeArc,sweep,x,y)
Likes: totebo