早教吧 育儿知识 作业答案 考试题库 百科 知识分享

pDC->Ellipse(CRect(npoint.x-i,npoint.y-i,npoint.x+i,npoint.y+i));pDC->Ellipse和CRect怎么用?

题目详情
pDC->Ellipse(CRect(npoint.x-i,npoint.y-i,npoint.x+i,npoint.y+i)); pDC->Ellipse 和 CRect 怎么用?
▼优质解答
答案和解析
左上角和右下角的坐标
CDC::Ellipse
BOOL Ellipse( int x1,int y1,int x2,int y2 );
BOOL Ellipse( LPCRECT lpRect );
Return Value
Nonzero if the function is successful; otherwise 0.
Parameters
x1
Specifies the logical x-coordinate of the upper-left corner of the ellipse’s bounding rectangle.
y1
Specifies the logical y-coordinate of the upper-left corner of the ellipse’s bounding rectangle.
x2
Specifies the logical x-coordinate of the lower-right corner of the ellipse’s bounding rectangle.
y2
Specifies the logical y-coordinate of the lower-right corner of the ellipse’s bounding rectangle.
lpRect
Specifies the ellipse’s bounding rectangle.You can also pass a CRect object for this parameter