<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                擴展mxPoint以實現具有雙精度坐標的二維矩形。 ``` function mxRectangle(x, y, width, height) ``` **變量**: - `width` : 容納矩形的寬度,默認為 `0` - `height` : 容納矩形的高度,默認為 `0` **函數**: - `setRect(x, y, w, h)` : 將此矩形設定為指定的值 - `getCenterX()` : 返回中心點的X坐標 - `getCenterY()` : 返回中心點的Y坐標 ``` const rect = new mxRectangle(0, 0, 200, 30) const rect2 = new mxRectangle(10, 20, 200, 30) rect.getCenterX() // 100 rect.getCenterY() // 15 rect2.getCenterX() // 110 rect2.getCenterY() // 35 ``` - `add(rect: mxRectangle)` : 將給定的矩形添加到此矩形 ``` const rect = new mxRectangle(0, 0, 200, 30) const rect2 = new mxRectangle(10, 10, 200, 30) rect.add(rect2) rect // 210x40 ``` ![](https://img.kancloud.cn/94/ae/94aebbea443c3994766352bdcc7a8da4_554x179.png) - `intersect(rect: mxRectangle)` : 將此矩形更改為與給定矩形重疊的位置。 ``` rect.intersect(rect2) rect // 190x20 ``` ![](https://img.kancloud.cn/f0/0a/f00aaf9dcc8cb10a17d258cb9c6ab59c_555x171.png) - `grow(amount)` : 將矩形增長給定的數量,也就是說,此方法從 `x` 坐標和 `y` 坐標中減去給定的數量,然后將寬度和高度相加兩倍。 ``` const rect = new mxRectangle(20, 20, 200, 30) rect.grow(20) rect // 240x70 ``` ![](https://img.kancloud.cn/e1/11/e1113391aae2bff4a2d00f1d96101987_638x255.png) - `getPoint()` : 返回左上角作為新的 `mxPoint` ``` const rect = new mxRectangle(20, 20, 200, 30) rect.getPoint() // mxPoint {x: 20, y: 20} ``` - `rotate90()` : 將此矩形圍繞其中心點旋轉90度。 - `equals(obj)` : 如果給定對象等于此矩形,則返回 `true` - `fromRectangle(rect: mxRectangle)` : 返回一個新的mxRectangle,它是給定矩形的副本
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看