-
Notifications
You must be signed in to change notification settings - Fork 2
/
CircleArc.cpp
33 lines (32 loc) · 1.07 KB
/
CircleArc.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#include "stdafx.h"
#include <cmath>
#include "CircleArc.h"
void CircleArc::Draw()
{
// int oX, oY;
//
// oX = (int)(m_nRadius / cos(0.0628318 * m_Percent));
// oY = (int)(m_nRadius / sin(0.0628318 * m_Percent));
// if (m_Percent > 0 && m_Percent <= 25)
// {
// oX = (int)(m_nRadius / cos(0.0628318 * (m_Percent+50)));
// oY = (int)(m_nRadius / sin(0.0628318 * (m_Percent+50)));
// }
// else if (m_Percent > 25 && m_Percent <= 50)
// {
// oX = (int)(m_nRadius / cos(0.0628318 * m_Percent));
// oY = (int)(m_nRadius / sin(0.0628318 * m_Percent));
// }
// else if (m_Percent > 50 && m_Percent <= 75)
// {
// oX = (int)(m_nRadius / cos(0.0628318 * (m_Percent-50)));
// oY = (int)(m_nRadius / sin(0.0628318 * (m_Percent-50)));
// }
// else if (m_Percent > 75 && m_Percent < 100)
// {
// oX = (int)(m_nRadius / cos(0.0628318 * m_Percent));
// oY = (int)(m_nRadius / sin(0.0628318 * m_Percent));
// }
// m_nCenter.x = oX + m_nCenter.x;
// m_nCenter.y = oY + m_nCenter.y;
}