0

I am using XmlDocument to extract x1, x2, y1, y2 of line from a svg file. Then I have c# move the mouse to paint it somewhere on the screen using mouse_event((int)(MouseEventFlags.LEFTDOWN), 0, 0, 0, 0); and others.

Now with x1 = x2 and y1 <> y1 and x1 <> x2 and y1 == y1 that's a simple loop for mouse coordinates. With x1 <> x2 and y1 <> y2, it gets more complicated, but still feasible. Yet with M 26.029437251522861,59.970562748477143 A 24,24 0 1,1 43,67 and similar, this gets much more tedious.

How do I convert a svg will all kinds of strokes(just strokes, no gaussian blur or other effects) to line commands or especially x1, x2, y1, y2 of line to paint them?

Alex
  • 117
  • 11
  • Thanks. But this is not c#. – Alex Sep 01 '19 at 14:58
  • Look at https://stackoverflow.com/questions/9247564/convert-bezier-curve-to-polygonal-chain and if you are using c# then https://learn.microsoft.com/en-us/dotnet/framework/winforms/advanced/how-to-flatten-a-curved-path-into-a-line may have some interest – Ruskin Sep 02 '19 at 09:11

0 Answers0