svgpathtools icon indicating copy to clipboard operation
svgpathtools copied to clipboard

Converting complex bbox coordinates to ViewBox relative points

Open ddurgaprasad opened this issue 7 years ago • 0 comments

Hello, I have an svg with viewbox(0,0,612,792) . bbox on any path elements gives complex numbers .Is there a way to convert them into coordinates with respect to top left corner of viewbox? Path(Line(start=(790.996+1827j), end=(790.996+1804j))) I am using path[0].length() to find lines with certain length and replace them with lines across/along the viewbox at same locations.

If line1= x1,y1,x1,y2 then replacement would be x1,y1,x1,612

ddurgaprasad avatar Apr 06 '18 02:04 ddurgaprasad