> For the complete documentation index, see [llms.txt](https://chaoses-ib.gitbook.io/directory-opus/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://chaoses-ib.gitbook.io/directory-opus/guan-fang-shou-ce/readme.zh-10/readme.zh-3/readme.zh/rect.zh.md).

# Rect

**Rect** 对象表示一个矩形（或在某些情况下，与矩形的四条边相关的东西）。

下面的描述给出了属性的典型含义。如果方法返回的 **Rect** 具有不同的含义，则会在该方法的文档中注明。

| 属性名称   | 返回类型   | 描述                                                                                                                                                         |
| ------ | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
| empty  | *bool* | 如果矩形为空（即没有高度或没有宽度），则返回 true。                                                                                                                               |
| left   | *int*  | 返回矩形的左边缘。                                                                                                                                                  |
| top    | *int*  | 返回矩形的顶边缘。                                                                                                                                                  |
| right  | *int*  | <p>返回矩形的右边缘。<br>注意，此值实际上在右边缘之外为 1。矩形包含从左边缘开始到右边缘结束（不包括右边缘）的所有内容。<br>位置为 0,7 且宽度为 0 的矩形将具有 left=0 和 right=0。相同位置，但宽度为 1 的矩形将具有 left=0 和 right=1，依此类推。</p>   |
| bottom | *int*  | <p>返回矩形的底边缘。<br>注意，此值实际上在右边缘之外为 1。矩形包含从顶边缘开始到底边缘结束（不包括底边缘）的所有内容。<br>位置为 0,7 且高度为 0 的矩形将具有 top=7 和 bottom=7。相同位置，但高度为 10 的矩形将具有 top=7 和 bottom=17，依此类推。</p> |
| width  | *int*  | 返回矩形的宽度。等于 **right-left**。                                                                                                                                 |
| height | *int*  | 返回矩形的宽度。等于 **bottom-top**。                                                                                                                                 |

| 方法名称     | **参数** | 返回类型      | 描述                                                             |
| -------- | ------ | --------- | -------------------------------------------------------------- |
| ToString | *none* | \<string> | 返回一个字符串，描述矩形的位置和大小，便于调试脚本。格式为 "(L,T - R,B; WxH)"，即左、上、右、下、宽和高。 |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://chaoses-ib.gitbook.io/directory-opus/guan-fang-shou-ce/readme.zh-10/readme.zh-3/readme.zh/rect.zh.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
