AnalysisRegion.IntersectsWith 方法
确定 AnalysisRegion 的区域是否与指定的矩形相交。
命名空间: System.Windows.Ink
程序集: IAWinFX(在 IAWinFX.dll 中)
语法
声明
Public Function IntersectsWith ( _
rectangle As Rect _
) As Boolean
用法
Dim instance As AnalysisRegion
Dim rectangle As Rect
Dim returnValue As Boolean
returnValue = instance.IntersectsWith(rectangle)
public bool IntersectsWith(
Rect rectangle
)
public:
bool IntersectsWith(
Rect rectangle
)
public boolean IntersectsWith(
Rect rectangle
)
public function IntersectsWith(
rectangle : Rect
) : boolean
参数
- rectangle
类型:System.Windows.Rect
要与之比较的矩形(以墨迹空间坐标表示)。
返回值
类型:System.Boolean
如果 AnalysisRegion 的区域与指定的矩形相交,则为 true;否则为 false。
备注
如果 rectangle 的边界在 MinXY 和 MaxXY 之外,则 IntersectsWith 方法会引发 ArgumentOutOfRangeException。
示例
此示例测试名为 theFirstAnalysisRegion 的 AnalysisRegion 是否与指定的矩形相交。
' Test for intersection between an AnalysisRegion and a rectangle.
If theFirstAnalysisRegion.IntersectsWith(New Rect(50, 50, 100, 100)) Then
' Insert code here.
End If
// Test for intersection between an AnalysisRegion and a rectangle.
if (theFirstAnalysisRegion.IntersectsWith(
new Rect(50, 50, 100, 100)))
{
// Insert code here.
}
平台
Windows Vista
.NET Framework 和 .NET Compact Framework 并不是对每个平台的所有版本都提供支持。有关支持的版本的列表,请参见.NET Framework 系统要求。
版本信息
.NET Framework
受以下版本支持:3.0