원의 방정식을 이용하여, 일정 구역안에 점이 찍히게 함.
math.h를 인클루드 할 것
void CSssView::OnPaint()
{
CPaintDC dc(this); // device context for painting
int x, y;
CPen pen(PS_ENDCAP_ROUND,1,RGB(255,0,0)); //브러쉬생성
// TODO: Add your message handler code here
for (x=0; x<255; x++)
for(y=0; y<256; y++)
if(pow(x-127,2)+pow(y-127,2)<pow(127,2))
dc.SetPixel(x, y, RGB(x, tan(x*y), y));
// Do not call CEditView::OnPaint() for painting messages
}
math.h를 인클루드 할 것
void CSssView::OnPaint()
{
CPaintDC dc(this); // device context for painting
int x, y;
CPen pen(PS_ENDCAP_ROUND,1,RGB(255,0,0)); //브러쉬생성
// TODO: Add your message handler code here
for (x=0; x<255; x++)
for(y=0; y<256; y++)
if(pow(x-127,2)+pow(y-127,2)<pow(127,2))
dc.SetPixel(x, y, RGB(x, tan(x*y), y));
// Do not call CEditView::OnPaint() for painting messages
}
댓글 달기