본문 바로가기
programming/임시

MFC로 원형 차트만들기

by hotdogya 2010. 1. 5.

MFC 수업 과제로 만든 원형차트

 

중요한건 이 계산식 rectView라는 사각형에서 각 부채꼴모양 pie좌표구하기

100만년만에 삼각함수 다시 공부;; 

x[0] = static_cast<int>(width * cos((360 * avr[0] / 100)*pi/180)) + rectView.CenterPoint().x;
  y[0] = static_cast<int>(height * sin((360 * avr[0] / 100)*pi/180)) + rectView.CenterPoint().y;

 

소스첨부 주석은 거의 없음;;