pDC->Ellipse(CRect(npoint.x-i,npoint.y-i,npoint.x+i,npoint.y+i)); pDC->Ellipse 和 CRect 怎么用????
2个回答
展开全部
左上角和右下角的坐标
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
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
2011-07-05
展开全部
先用CRect确定矩形left、top、right和bottom位置,再用Ellipse根据矩形位置画椭圆
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询