[WIN32SS]

* Fix a corner case when the start segments overlaps the end segment in Chord(), Pie(), Arc() and ArcTo() functions.
* This should fix the Pie chart in "Disk Properties" when all the space is used.
* Brought to you by Victor Martinez Calvo.
CORE-6848 #resolve #comment Committed in r58291. Thanks !

svn path=/trunk/; revision=58291
This commit is contained in:
Amine Khaldi 2013-02-05 23:02:36 +00:00
parent c71475e3bb
commit 29c6f1ee4d

View file

@ -131,6 +131,12 @@ IntArc( DC *dc,
AngleEnd = atan2((RectSEpts.bottom - CenterY), RectSEpts.right - CenterX)*(360.0/(M_PI*2));
AngleStart = atan2((RectSEpts.top - CenterY), RectSEpts.left - CenterX)*(360.0/(M_PI*2));
/* Edge Case: Check if the start segments overlaps(is equal) the end segment */
if (AngleEnd == AngleStart)
{
AngleStart = AngleEnd + 360.0; // Arc(), ArcTo(), Pie() and Chord() are counterclockwise APIs.
}
SfCx = (LONG)(Rcos(AngleStart) * RadiusX);
SfCy = (LONG)(Rsin(AngleStart) * RadiusY);
EfCx = (LONG)(Rcos(AngleEnd) * RadiusX);