1

I'm using this code to draw an arc, and I'm thinking that there must be some background calculations like arc center point, arc start angle and arc end angle that method ArcTo is doing. So my question is are there that type of calculations and if, how can I access them.

StreamGeometry sg = new StreamGeometry();
Point p0 = new Point(0,0);                      //start point
Point p1 = new Point(100,0);                    //end point
Size size = new Size(80, 80);                   //radius
bool isLarge = false;                           //large or small arc
SweepDirection swd = SweepDirection.Clockwise;  //sweep direction

using (StreamGeometryContext sgc = sg.Open())
{
    sgc.BeginFigure(p0, false, false);
    sgc.ArcTo(p1, size, 0, isLarge, swd, true, false);
}

The purpose of this is when an arc is drawn I need to print out the center and start and end angle.

UsrDS
  • 23
  • 4
  • 1
    You have to calculate this yourself. – Clemens Apr 11 '18 at 15:26
  • your parameters looks similar to SVG elliptic arc so see: [Converting an svg arc to lines](https://stackoverflow.com/a/41544540/2521214) just ignore parameters you do not have – Spektre Apr 12 '18 at 06:02

0 Answers0