在MFC环境中绘制正弦曲线的函数 CDC *pDC=GetDC();CPen NewPen;NewPen.CreatePen(PS_SOLID,2,RGB(255,0,0));CPen *pOldPen=pDC->SelectObject(&NewPen);pDC->MoveTo(20,yCenter);int y,x;double dy;for(int i=5;iLineTo(x,y);pDC->MoveTo(x,y);}pDC->Selec
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/20 16:41:25
在MFC环境中绘制正弦曲线的函数 CDC *pDC=GetDC();CPen NewPen;NewPen.CreatePen(PS_SOLID,2,RGB(255,0,0));CPen *pOldPen=pDC->SelectObject(&NewPen);pDC->MoveTo(20,yCenter);int y,x;double dy;for(int i=5;iLineTo(x,y);pDC->MoveTo(x,y);}pDC->Selec
在MFC环境中绘制正弦曲线的函数
CDC *pDC=GetDC();
CPen NewPen;
NewPen.CreatePen(PS_SOLID,2,RGB(255,0,0));
CPen *pOldPen=pDC->SelectObject(&NewPen);
pDC->MoveTo(20,yCenter);
int y,x;
double dy;
for(int i=5;iLineTo(x,y);
pDC->MoveTo(x,y);
}
pDC->SelectObject(pOldPen);
NewPen.DeleteObject();
dy=(yCenter-20)*sin(i*4*3.14159/(nRight-45));这个式子的具体解释 一定具体点 我特别想明白一下
在MFC环境中绘制正弦曲线的函数 CDC *pDC=GetDC();CPen NewPen;NewPen.CreatePen(PS_SOLID,2,RGB(255,0,0));CPen *pOldPen=pDC->SelectObject(&NewPen);pDC->MoveTo(20,yCenter);int y,x;double dy;for(int i=5;iLineTo(x,y);pDC->MoveTo(x,y);}pDC->Selec
在X方向做为步进方向,用dy做增量,每次计算下一个结点的坐标,然后画线.