共用方式為


AnalysisRegionBase.Union 方法 (Int32, Int32, Int32, Int32)

將這個 AnalysisRegionBase 的區域擴大為其與指定的矩形聯集所產生的區域。

命名空間:  System.Windows.Ink.AnalysisCore
組件:  IACore (在 IACore.dll 中)

語法

'宣告
Public Sub Union ( _
    left As Integer, _
    top As Integer, _
    right As Integer, _
    bottom As Integer _
)
'用途
Dim instance As AnalysisRegionBase
Dim left As Integer
Dim top As Integer
Dim right As Integer
Dim bottom As Integer

instance.Union(left, top, right, bottom)
public void Union(
    int left,
    int top,
    int right,
    int bottom
)
public:
void Union(
    int left, 
    int top, 
    int right, 
    int bottom
)
public void Union(
    int left,
    int top,
    int right,
    int bottom
)
public function Union(
    left : int, 
    top : int, 
    right : int, 
    bottom : int
)

參數

  • left
    型別:System.Int32
    要與之結合的矩形左界限,以筆墨空間座標表示。
  • top
    型別:System.Int32
    要與之結合的矩形頂端界限,以筆墨空間座標表示。
  • right
    型別:System.Int32
    要與之結合的矩形右界限,以筆墨空間座標表示。
  • bottom
    型別:System.Int32
    要與之結合的矩形底端界限,以筆墨空間座標表示。

備註

所有參數都會使用 HIMETRIC 單位。

如果任一個區域為無限,新區域也是無限。

範例

這個範例使用 ExcludeIntersectUnion 修改現有 AnalysisRegionBase (名為 theFirstAnalysisRegionBase) 的區域。

' Extend an AnalysisRegionBase using the Union method and
' an AnalysisRegionBase.
theFirstAnalysisRegionBase.Union(theSecondAnalysisRegionBase)

' Extend an AnalysisRegionBase using the Union method and a rectangle.
theFirstAnalysisRegionBase.Union(0, 500, 3000, 3500)

' Restrict an AnalysisRegionBase using the Intersect method and
' an AnalysisRegionBase.
theFirstAnalysisRegionBase.Intersect(theSecondAnalysisRegionBase)

' Restrict an AnalysisRegionBase using the Intersect method and a rectangle.
theFirstAnalysisRegionBase.Intersect(1000, 1000, 5000, 5000)

' Restrict an AnalysisRegionBase using the Exclude method and
' an AnalysisRegionBase.
theFirstAnalysisRegionBase.Exclude(theSecondAnalysisRegionBase)

' Modify an AnalysisRegionBase using the Exclude method and a rectangle.
theFirstAnalysisRegionBase.Exclude(1500, 1500, 2500, 2500)
// Extend an AnalysisRegionBase using the Union method and
// an AnalysisRegionBase.
theFirstAnalysisRegionBase.Union(theSecondAnalysisRegionBase);

// Extend an AnalysisRegionBase using the Union method and a rectangle.
theFirstAnalysisRegionBase.Union(0, 500, 3000, 3500);

// Restrict an AnalysisRegionBase using the Intersect method and
// an AnalysisRegionBase.
theFirstAnalysisRegionBase.Intersect(theSecondAnalysisRegionBase);

// Restrict an AnalysisRegionBase using the Intersect method and a rectangle.
theFirstAnalysisRegionBase.Intersect(1000, 1000, 5000, 5000);

// Restrict an AnalysisRegionBase using the Exclude method and
// an AnalysisRegionBase.
theFirstAnalysisRegionBase.Exclude(theSecondAnalysisRegionBase);

// Modify an AnalysisRegionBase using the Exclude method and a rectangle.
theFirstAnalysisRegionBase.Exclude(1500, 1500, 2500, 2500);

平台

Windows Vista, Windows XP SP2, Windows Server 2003

.NET Framework 和 .NET Compact Framework 並不支援各種平台的所有版本。如需支援平台版本的相關資訊,請參閱 .NET Framework 系統需求

版本資訊

.NET Framework

支援版本:3.0

請參閱

參考

AnalysisRegionBase 類別

AnalysisRegionBase 成員

Union 多載

System.Windows.Ink.AnalysisCore 命名空間

AnalysisRegionBase.Exclude

AnalysisRegionBase.Intersect