有三个点 A, B, C
A:CPoint point;
B: CPoint ltPoint;
C: CPoint rbPoint;
怎么判断点A 是否在以点B为左上角,C为右下角组成的矩形所确定的椭圆里面?
A:CPoint point;
B: CPoint ltPoint;
C: CPoint rbPoint;
怎么判断点A 是否在以点B为左上角,C为右下角组成的矩形所确定的椭圆里面?
解决方案 »
- 用编程来控制另外一个窗口程序的功能时的问题,可加到200分
- 求救!!!#include <windows.h>
- Code Project找不到不规则窗口创建的源代码
- CStdioFile类的writestring()函数问题?
- 昨天偶太穷了,我的问题放了两天没人理!今天挣了10分,送给帮我解决问题的人,请热心人进!
- 关于星际争霸的问题.
- 请教各位大虾关于DLL的调试问题
- 怎样在对话框里加入背景!!
- GSM短信猫如何设置配置表连接oracle数据库
- 对不起,我连这种白痴问题都问,谢谢大家帮我回答一下!
- 谁能够提供关于防火墙的资料和代码,高分奉献!!!
- 搞不懂,为什么我的UpdateData(FALSE)就是不好用?在线等待。。。。。。
a调这两个点距离和大于定值在椭圆外,否则在椭圆内
定值=c.x-b.x
定义一个CRgn rgn;
rgn.CreateEllipticRgn(A,B);
if (PtInRegion(rgn, point))
^_^!!!
HRGN CreateEllipticRgn( int nLeftRect, // x-coordinate of the upper-left corner of the bounding rectangle
int nTopRect, // y-coordinate of the upper-left corner of the bounding rectangle
int nRightRect, // x-coordinate of the lower-right corner of the bounding rectangle
int nBottomRect // y-coordinate of the lower-right corner of the bounding rectangle
); 然后用下面的API函数确定点是否在区域内:BOOL PtInRegion( HRGN hrgn, // handle of region
int X, // x-coordinate of point
int Y // y-coordinate of point
);