I'm stuck in my Java awt development by some Maths.
I need to put SVG's Path command into a path from awt. Everything works nicely, but then I ran into the ArcTo command, and I still can't make it right.
AWT's ArcTo command needs the x and y coordinates, width and height of the Rectangle that will contain the Arc, an angleStart, the angle extent of the arc, and the type of arc-ending(irrelevant).
new Arc2D.Double(x, y, w, h, start, extent, type);
SVG's ArcTo command is nothing but that. Svg gives the X and Y radii of the arc, a rotation, two booleans(flags) and a targetPoint. The two flags are used to chose between the four possibilities of arcs left by the other parameters. This link shows nicely how it's done.
A rx ry x-axis-rotation large-arc-flag sweep-flag x y
JavaFX's ArcTo Command works barely like that,
new ArcTo(radiusX, radiusY, xAxisRotation, arcExtent, arcY, largeArcFlag, sweepFlag);
My Maths are not good enough to do such a conversion between those two constructors. I'll continue my research but I'm really lost rigth now, I really need your help!