mirror of
https://github.com/reactos/reactos.git
synced 2025-08-02 05:15:41 +00:00
[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:
parent
c71475e3bb
commit
29c6f1ee4d
1 changed files with 6 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue