GetPoints Method
GetPoints Method |
Gets the points that make up a stroke.
Declaration
[C++]
HRESULT GetPoints (
[in, optional, defaultvalue(ISC_FirstElement)] long startingIndex,
[in, optional, defaultvalue(ISC_AllElements)] long pointCount,
[out, retval] VARIANT* Points
);
[Microsoft® Visual Basic® 6.0]
Public Function GetPoints( _
[startingIndex As Long], _
[pointCount As Long = -1] _
) As Variant
Parameters
startingIndex
[in, optional] The starting index within the array of points that make up the stroke. The default value ISC_FirstElement, defined in the ItemSelectionConstants enumeration type, specifies the first point.
pointCount
[in, optional] The number of points to return. The default value ISC_AllElements, defined in the ItemSelectionConstants enumeration type, specifies all of the points that make up the stroke data.
Points
[out, retval] The array of points from the stroke.
For more information about the VARIANT structure, see Using the Automation Library.
Return Value
HRESULT value | Description |
---|---|
S_OK | Success. |
E_POINTER | A parameter contained an invalid pointer. |
E_OUTOFMEMORY | Cannot allocate memory for the points. |
E_INVALIDARG | Invalid index (out of range). |
E_INK_EXCEPTION | An exception occurred inside the method. |
E_UNEXPECTED | Unexpected parameter or property type. |
Example
[Visual Basic 6.0]
This Visual Basic 6.0 example gets all of the point data from the IInkStrokeDisp, theStroke. This data is returned as an array of Long values in the form x1, y1, x2, y2, and so on, with each pair of values representing one point.
Dim ptStrokePoints () As Long
ptStrokePoints = theStroke.GetPoints()