Fixed adding arc to wxGraphicsPath with Direct2D renderer.

To handle properly all combinations of the start and end angles and to ensure consistency with Cairo renderer behaviour there is necessary
1. To normalize angle values the same way as it is done in Cairo.
and
2. When difference between end angle and start angle >= 2*pi then in addition to the arc itself also one or more full circles have to be added to the path.

See #17558
See #17557
This commit is contained in:
Artur Wieczorek
2016-06-04 10:20:34 +02:00
parent 90b9bcbcf3
commit 9f9d593019
2 changed files with 91 additions and 27 deletions

View File

@@ -31,6 +31,11 @@ public:
The angles are measured in radians but, contrary to the usual
mathematical convention, are always @e clockwise from the horizontal
axis.
If for clockwise arc @a endAngle is less than @a startAngle it will be
progressively increased by 2*pi until it is greater than @a startAngle.
If for counter-clockwise arc @a endAngle is greater than @a startAngle
it will be progressively decreased by 2*pi until it is less than
@a startAngle.
*/
//@{
virtual void AddArc(wxDouble x, wxDouble y, wxDouble r,