AnalysisRegion.Intersect - метод (Rectangle)
Обновлен: Ноябрь 2007
Restricts the area of this AnalysisRegion to the area created by its intersection with the specified rectangle.
Пространство имен: Microsoft.Ink
Сборка: Microsoft.Ink.Analysis (в Microsoft.Ink.Analysis.dll)
Синтаксис
'Декларация
Public Sub Intersect ( _
rectangle As Rectangle _
)
'Применение
Dim instance As AnalysisRegion
Dim rectangle As Rectangle
instance.Intersect(rectangle)
public void Intersect(
Rectangle rectangle
)
public:
void Intersect(
Rectangle rectangle
)
public void Intersect(
Rectangle rectangle
)
public function Intersect(
rectangle : Rectangle
)
Параметры
- rectangle
Тип: System.Drawing.Rectangle
The rectangle with which to intersect in ink space coordinates.
Заметки
If the two areas do not intersect, the new area is empty.
Примеры
This example creates two AnalysisRegion objects. It uses the Intersect, Union, and Exclude methods to modify the objects' areas.
' 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