Compartilhar via


Stroke.FindIntersections Method

Stroke.FindIntersections Method

Finds the points where this Stroke object intersects other Stroke objects within a given Strokes collection.

Definition

Visual Basic .NET Public Function FindIntersections( _
ByVal strokes As Strokes _
) As Single()
C# public float[] FindIntersections(
Strokes strokes
);
Managed C++ public: float* FindIntersections(
Strokes *strokes
) __gc[];

Parameters

strokes Microsoft.Ink.Strokes. The Strokes collection used to test for intersections with this Stroke object. If null (Nothing in Microsoft® Visual Basic® .NET), uses all Strokes collections in the Ink object.

Return Value

System.Single[]. This method returns an array of floating point index values that indicate the locations where the intersections occur.

A floating point index is a float value that represents a location somewhere between two points in the Stroke object. As examples, if 0.0 is the first point in the stroke and 1.0 is the second point in the stroke, 0.5 is halfway between the first and second points. Similarly, a floating point index value of 37.25 represents a location that is 25 percent along the line between points 37 and 38 of the stroke.

Exceptions

ArgumentException Leave Site: One of the parameters is not valid.
ArgumentException Leave Site: One of the parameters is not valid.
COMException Leave Site:

Remarks

Note: The Strokes collection in the strokes parameter must come from the same Ink object as the Stroke object you are testing for intersection.

This method can determine only the points of intersection.

Examples

[C#]

This C# example finds all of the intersections of the Stroke object, theStroke, and the rest of the Strokes collection in the Ink object, theInk.

float[] findexArray = theStroke.FindIntersections(theInk.Strokes);
                

[VB.NET]

This Microsoft® Visual Basic® .NET example finds all of the intersections of the Stroke object, theStroke, and the rest of the Strokes collection in the Ink object, theInk.

Dim findexArray() As Single = theStroke.FindIntersections(theInk.Strokes)
                

See Also