zoukankan      html  css  js  c++  java
  • 【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()。

  • 相关阅读:
    Idea主题下载
    使用plsql创建用户并授权(图形化界面)
    PLSQL Developer 没有64位版本 + 找不到 msvcr71.dll
    NOIp2017TG解题报告
    Restart
    NOIp2018RP++
    其他题
    Errors
    NOIpDairy
    Code Style for OI
  • 原文地址:https://www.cnblogs.com/crymm/p/4954856.html
Copyright © 2011-2022 走看看