IInkStrokeDisp::SetPoints method (msinkaut.h)
Sets the points of the IInkStrokeDisp using an array of X, Y values.
Syntax
HRESULT SetPoints(
[in] VARIANT Points,
[in, optional] long Index,
[in, optional] long Count,
[out, retval] long *NumberOfPointsSet
);
Parameters
[in] Points
The array of new points to replace the points in the stroke beginning at index. This is a VARIANT containing an array of Long with the points represented by alternating values of the form x0, y0, x1, y1, x2, y2, and so on.
For more information about the VARIANT structure, see Using the COM Library.
[in, optional] Index
Optional. The zero-based index of the first point in the stroke to be modified. The default value ISC_FirstElement, defined in the ItemSelectionConstants enumeration type, specifies that the first point in the stroke is modified.
[in, optional] Count
Optional. The count of points in the stroke to be modified. The default value ISC_AllElements, defined in the ItemSelectionConstants enumeration type, specifies that all points in the stroke are modified.
[out, retval] NumberOfPointsSet
When this method returns, contains the actual number of packets set.
Return value
This method can return one of these values.
Return code | Description |
---|---|
|
Success. |
|
A parameter contained an invalid pointer. |
|
Invalid index (out of range), or points parameter. Was not in the correct format. |
|
An exception occurred inside the method. |
Remarks
This method does not change the number of points in the stroke. To change the number of points in the stroke, a new stroke must be created, or the stroke must be split.
This method does not provide for truncating the stroke. If the points array contains fewer points than the stroke, the remainder of the points in the stroke are not be modified.
This method does not provide for extending the stroke. If the points array contains more points than the stroke, the extra points are not used. If the count exceeds the number of points in the array, only the number of points in the array are modified.
In order to draw the stroke after calling SetPoints, call the InvalidateRect function.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows XP Tablet PC Edition [desktop apps only] |
Minimum supported server | None supported |
Target Platform | Windows |
Header | msinkaut.h |
Library | InkObj.dll |