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

将此 AnalysisRegionBase 的区域限制为它与指定矩形相交所形成的区域。

命名空间:  System.Windows.Ink.AnalysisCore
程序集:  IACore(在 IACore.dll 中)

语法

声明
Public Sub Intersect ( _
    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.Intersect(left, top, right, bottom)
public void Intersect(
    int left,
    int top,
    int right,
    int bottom
)
public:
void Intersect(
    int left, 
    int top, 
    int right, 
    int bottom
)
public void Intersect(
    int left,
    int top,
    int right,
    int bottom
)
public function Intersect(
    left : int, 
    top : int, 
    right : int, 
    bottom : int
)

参数

  • left
    类型:System.Int32
    要与之相交的矩形的左边界(以墨迹空间坐标表示)。
  • top
    类型:System.Int32
    要与之相交的矩形的上边界(以墨迹空间坐标表示)。
  • right
    类型:System.Int32
    要与之相交的矩形的右边界(以墨迹空间坐标表示)。
  • bottom
    类型:System.Int32
    要与之相交的矩形的下边界(以墨迹空间坐标表示)。

备注

所有参数都以墨迹空间坐标表示。

如果两个区域不相交,则新区域为空。

示例

该示例使用 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 成员

Intersect 重载

System.Windows.Ink.AnalysisCore 命名空间

AnalysisRegionBase.Exclude

AnalysisRegionBase.Union