Arc Segment between two points and a radius
c#, geometry, wpf
Solution
Create a PathFigure with P1 as `StartPoint` and an ArcSegment with P2 as `Point` and a quadratic `Size` that contains the radius.
Example: P1 = (150,100), P2 = (50,50), Radius = 100, i.e. Size=(100,100):
<Path Stroke="Black">
<Path.Data>
<PathGeometry>
<PathFigure StartPoint="150,100">
<ArcSegment Size="100,100" Point="50,50"/>
</PathFigure>
</PathGeometry>
</Path.Data>
</Path>
or shorter:
<Path Stroke="Black" Data="M150,100 A100,100 0 0 0 50,50"/>
Problem
I am trying to paint an arc segment using WPF, but I somehow cannot figure out how to do this using the ArcSegment-Element. I have two points of the arc given (P1 and P2) and I also have the center of the circle and the radius.