XCoordinate Left() | 返回 Rectangle 的左边界。只读属性。 |
YCoordinate top() | 返回 Rectangle 的上边界。只读属性。 |
XCoordinate Right() | 返回 Rectangle 的右边界。只读属性。 |
YCoordinate Bottom() | 返回 Rectangle 的下边界。只读属性。 |
Distance Width() | 返回 Rectangle 的宽度。只读属性。 |
Distance Height() | 返回 Rectangle 的高度。只读属性。 |
Area Area() | 返回 Rectangle 的面积。只读属性。 |
Void Left( XCoordinate x ) | 设置 Rectangle 的左边界。 |
Void top( YCoordinate y ) | 设置 Rectangle 的上边界。 |
Void Right( XCoordinate x ) | 设置 Rectangle 的右边界。 |
Void Bottom( YCoordinate y ) | 设置 Rectangle 的下边界。 |
XCoordinate XCenter() | Rectangle 中心的 X 坐标。 |
YCoordinate YCenter() | Rectangle 中心的 Y 坐标。 |
Void Inflate( Distance xDist, Distance yDist ) | 将 Rectangle 按 xDist 向左和向右扩展,并按 yDist 向上和向下扩展。 |
XCoordinate GetX( Real ratio ) | 计算位于 Rectangle 内、介于 Left 和 Right 坐标之间的 X 坐标,计算方式为 Left + Width * ratio。 |
YCoordinate GetY( Real ratio ) | 计算位于 Rectangle 内、介于 top 和 Bottom 坐标之间的 Y 坐标,计算方式为 Top + Height * ratio。 |
Rect GetInflated( Distance xDist, Distance yDist ) | 返回一个“扩展后的” Rectangle。每个顶点在扩展方向上按 xDist 和 yDist 移动(左上顶点向上和向左移动等)。Rectangle 本身保持不变。 |
Logic IsEmpty() | 检查 Rectangle 是否表示图像上的非空区域,即满足 Left < Right 且 top < Bottom 的区域。 |