跳轉到主要內容
區域是一組依自上而下順序排列的 Rectangle,其中每個較下方的 Rectangle 的上邊線都與其上方 Rectangle 的下邊線重合(因此這些 Rectangle 不會互相重疊)。

建構函式

建構函式說明
Region Region()建立一個空的 Region。
Region Region( RectArray rectArray )從 RectArray 型別的值建立的建構函式。建立一個包含 rectArray 陣列中 Rectangle 的 Region。

運算子

運算子說明
Or對兩個區域取聯集。
And對兩個區域,或一個區域與一個矩形取交集。回傳型別為 Region 的值。

方法

方法說明
XCoordinate Left()傳回區域的左邊界。唯讀屬性。
YCoordinate top()傳回區域的上邊界。唯讀屬性。
XCoordinate Right()傳回區域的右邊界。唯讀屬性。
YCoordinate Bottom()傳回區域的下邊界。唯讀屬性。
Distance Width()傳回區域的寬度。唯讀屬性。
Distance Height()傳回區域的高度。唯讀屬性。
Area Area()傳回區域的面積。唯讀屬性。
Void Inflate( Distance xDist, Distance yDist )將區域向左、向右各擴展 xDist,並向上、向下各擴展 yDist。
Rect Rect()傳回包圍該區域的 Rectangle 副本。