Delphi判断某一个点是否在一个区域内


本文整理自网络,侵删。

 判断某一个点TPOINT是否在一个区域内TRECT用PtInRect函数,函数具体用法如下:

Indicates whether a specified point lies inside a specified rectangle.

Unit

Types

Category:

geometric routines

Delphi syntax:

function PtInRect(const Rect: TRect; const P: TPoint): Boolean;

C++ syntax:

extern PACKAGE bool __fastcall PtInRect(const TRect Rect, const TPoint P);

Description

PtInRect returns true if the point, P, lies inside the rectangle, Rect, and false if P is not in Rect.

PtInRect does not consider a point inside a rectangle if the rectangle has a negative width or height. A point is considered inside a rectangle if it lies on the left or top edge, but not if it lies on the right or bottom edge.

相关阅读 >>

Delphi 中文姓名 合法性检查

Delphi 用内存流文件流资源生成客户端

Delphi unidac 连接mdb access 数据库

Delphi中ocx的动态注册方法

Delphi xe5开发的android手机截屏功能

Delphi的字符截取函数leftstr,midstr,rightstr的介绍以及字符串拆分

Delphi截取字符串

Delphi 命令行 打开读写txt文件

Delphi 串口查询所有com口

Delphi tdirectory.tfilterpredicate

更多相关阅读请进入《Delphi》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...