AnalysisRegion.Intersect 方法 (AnalysisRegion)
將這個 AnalysisRegion 的區域限制為其與指定的 AnalysisRegion 交集所產生的區域。
命名空間: Microsoft.Ink
組件: Microsoft.Ink.Analysis (在 Microsoft.Ink.Analysis.dll 中)
語法
'宣告
Public Sub Intersect ( _
regionToIntersect As AnalysisRegion _
)
'用途
Dim instance As AnalysisRegion
Dim regionToIntersect As AnalysisRegion
instance.Intersect(regionToIntersect)
public void Intersect(
AnalysisRegion regionToIntersect
)
public:
void Intersect(
AnalysisRegion^ regionToIntersect
)
public void Intersect(
AnalysisRegion regionToIntersect
)
public function Intersect(
regionToIntersect : AnalysisRegion
)
參數
- regionToIntersect
型別:Microsoft.Ink.AnalysisRegion
要交集的 AnalysisRegion。
備註
如果兩個區域未交集,新區域為空白。
範例
這個範例會建立兩個 AnalysisRegion 物件,並使用 Intersect、Union 和 Exclude 方法修改物件的區域。
' Create an infinite AnalysisRegion.
Dim theFirstAnalysisRegion As New Microsoft.Ink.AnalysisRegion()
' Create a finite AnalysisRegion.
Dim theSecondAnalysisRegion As New Microsoft.Ink.AnalysisRegion( _
New System.Drawing.Rectangle(205, 205, 2054, 1027))
' Extend an AnalysisRegion using the Union method and an AnalysisRegion.
theFirstAnalysisRegion.Union(theSecondAnalysisRegion)
' Extend an AnalysisRegion using the Union method and a rectangle.
theFirstAnalysisRegion.Union(New Rectangle(0, 2054, 2054, 1027))
' Restrict an AnalysisRegion using the Intersect method and an AnalysisRegion.
theFirstAnalysisRegion.Intersect(theSecondAnalysisRegion)
' Restrict an AnalysisRegion using the Intersect method and a rectangle.
theFirstAnalysisRegion.Intersect(New Rectangle(750, 1000, 2500, 1500))
' Modify an AnalysisRegion using the Exclude method and an AnalysisRegion.
theFirstAnalysisRegion.Exclude(theSecondAnalysisRegion)
' Modify an AnalysisRegion using the Exclude method and a rectangle.
theFirstAnalysisRegion.Exclude(New Rectangle(750, 1000, 500, 500))
// Create an infinite AnalysisRegion.
Microsoft.Ink.AnalysisRegion theFirstAnalysisRegion =
new Microsoft.Ink.AnalysisRegion();
// Create a finite AnalysisRegion.
Microsoft.Ink.AnalysisRegion theSecondAnalysisRegion =
new Microsoft.Ink.AnalysisRegion(
new System.Drawing.Rectangle(205, 205, 2054, 1027));
// Extend an AnalysisRegion using the Union method and an AnalysisRegion.
theFirstAnalysisRegion.Union(theSecondAnalysisRegion);
// Extend an AnalysisRegion using the Union method and a rectangle.
theFirstAnalysisRegion.Union(new Rectangle(0, 2054, 2054, 1027));
// Restrict an AnalysisRegion using the Intersect method and an AnalysisRegion.
theFirstAnalysisRegion.Intersect(theSecondAnalysisRegion);
// Restrict an AnalysisRegion using the Intersect method and a rectangle.
theFirstAnalysisRegion.Intersect(new Rectangle(750, 1000, 2500, 1500));
// Modify an AnalysisRegion using the Exclude method and an AnalysisRegion.
theFirstAnalysisRegion.Exclude(theSecondAnalysisRegion);
// Modify an AnalysisRegion using the Exclude method and a rectangle.
theFirstAnalysisRegion.Exclude(new Rectangle(750, 1000, 500, 500));
平台
Windows Vista
.NET Framework 和 .NET Compact Framework 並不支援各種平台的所有版本。如需支援平台版本的相關資訊,請參閱 .NET Framework 系統需求。
版本資訊
.NET Framework
支援版本:3.0