| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1631 人关注过本帖
标题:关于VC中画矩形内切圆的问题
只看楼主 加入收藏
沙漠狼
Rank: 1
等 级:新手上路
帖 子:13
专家分:0
注 册:2010-1-5
结帖率:100%
收藏
 问题点数:0 回复次数:3 
关于VC中画矩形内切圆的问题
求MFC中能画矩形内切圆的函数。哪位能跟我说一下啊。很急啊。在百度上没有搜到。谢谢各位了!
搜索更多相关主题的帖子: 中画 矩形 
2010-01-09 16:34
sirtang
Rank: 4
等 级:业余侠客
帖 子:51
专家分:263
注 册:2010-1-17
收藏
得分:0 
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.

如果成功,则返回非零值,否则为0。

Parameters

x1

Specifies the logical x-coordinate of the upper-left corner of the ellipse’s bounding rectangle.

指定椭圆外接矩形左上角的X逻辑坐标

y1

Specifies the logical y-coordinate of the upper-left corner of the ellipse’s bounding rectangle.

指定椭圆外接矩形左上角的Y逻辑坐标。

x2

Specifies the logical x-coordinate of the lower-right corner of the ellipse’s bounding rectangle.

指定椭圆外接矩形右下角的X逻辑坐标。

y2

Specifies the logical y-coordinate of the lower-right corner of the ellipse’s bounding rectangle.

指定椭圆外接矩形右下角的Y逻辑坐标。

lpRect

Specifies the ellipse’s bounding rectangle. You can also pass a CRect object for this parameter.

指定椭圆外接矩形时,可以将Crect对象传递给该参数。

Remarks

Draws an ellipse. The center of the ellipse is the center of the bounding rectangle specified by x1, y1, x2, and y2, or lpRect. The ellipse is drawn with the current pen, and its interior is filled with the current brush.

绘制椭圆。椭圆与其外接矩形的中心由 x1,y1,x2,y2 或lpRect 指定,椭圆由当前画笔绘制,内部由当前画刷填充。

The figure drawn by this function extends up to, but does not include, the right and bottom coordinates. This means that the height of the figure is y2 – y1 and the width of the figure is x2 – x1.

该函数绘制的图形可以扩充到但并不包括右边及底部坐标,亦即图形的高度是y2-y1,宽度是x2-x1。

If either the width or the height of the bounding rectangle is 0, no ellipse is drawn.

如果外接椭圆的宽度或高度是0,则不绘制椭圆。
2010-01-18 14:20
hu3392100
Rank: 2
等 级:论坛游民
帖 子:52
专家分:81
注 册:2009-12-23
收藏
得分:0 
晕什么玩意!这么多!

水载舟,德载人。。。
2010-01-19 15:02
hu3392100
Rank: 2
等 级:论坛游民
帖 子:52
专家分:81
注 册:2009-12-23
收藏
得分:0 
我是这么想的,先画一个矩形然后根据矩形的两条边长来控制圆的大小与坐标可以不?

水载舟,德载人。。。
2010-01-19 15:04
快速回复:关于VC中画矩形内切圆的问题
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.017483 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved