设为首页 加入收藏

TOP

【Asphyre引擎】关于AsphyreTypes中OverlapRect的改动,都是泪啊!!!
2017-10-10 12:07:09 】 浏览:9010
Tags:Asphyre 引擎 关于 AsphyreTypes OverlapRect 改动 都是泪

OverlapRect改动:两个参数对调了。想问问LP,这样真的好吗?

Sphinx304版本的代码:

function OverlapRect(const Rect1, Rect2: TRect): Boolean;
begin
   Result:= (Rect1.Left < Rect2.Right) and (Rect1.Right >  Rect2.Left) and (Rect1.Top < Rect2.Bottom) and (Rect1.Bottom > Rect2.Top);
end;

PXL的代码:

function OverlapRect(const Rect1, Rect2: TIntRect): Boolean;
begin
  Result := (Rect2.Left < Rect1.Right) and (Rect2.Right > Rect1.Left) and (Rect2.Top < Rect1.Bottom) and
    (Rect2.Bottom > Rect1.Top);
end;

 

另:提供了IntRect方法和IntRectBDS方法,分别替代原来System.Classes的Bounds和Rect方法。在转换以前代码的时候,不要看到Rect()就直接替换成IntRect(),而是要替换成IntRectBDS()。

】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇Some cool FireMonkey multi-devi.. 下一篇传奇客户度文件代码完全解析

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目