Compartilhar via


PolylineCusps Property

PolylineCusps Property

Gets an array that contains the indices of the cusps of the IInkStrokeDisp object.

Declaration

[C++]

[C++]

[propget] HRESULT get_PolylineCusps (
    [out, retval] VARIANT* PolylineCusps
);

      

[Microsoft® Visual Basic® 6.0]

[Visual Basic]

Public Property Get PolylineCusps() As Variant

      

Property Value

The indices of the cusps of the IInkStrokeDisp object.

This property is read-only read/write.

For more information about the VARIANT structure, see Using the Automation Library.

Return Value

HRESULT value Description
S_OK Success.
E_POINTER The parameter pointer was NULL or invalid.
E_OUTOFMEMORY Cannot allocate memory for the array.
E_INK_EXCEPTION An exception occurred inside the method.

Remarks

The array returned by the PolylineCusps property is an index into the array returned by the GetPoints method. Each index in the PolylineCusps property corresponds to a point in the array returned by the GetPoints method that is a cusp of the points of the stroke.

A cusp is a point on the stroke where the direction of writing changes in a discontinuous fashion. For example, if the stroke represents the capital letter "L", this property returns three cusps: two corresponding to the first and last control points on the stroke and the third representing the corner of the "L".

The location of a cusp can be determined by using the cusp as an index into the array returned by the GetPoints method.

Example

[Visual Basic 6.0]

This Visual Basic 6.0 example uses the PolylineCusps property of the IInkStrokeDisp object, theStroke, and retrieves the coordinates of the cusps.


Dim theCusps As Variant
theCusps = theStroke.PolylineCusps
Dim X As Long
Dim Y As Long
For i=0 To Ubound(theCusps)
    X = theStroke.GetPoints(theCusps(i),1)(0)
    Y = theStroke.GetPoints(theCusps(i),1)(1)
    'Use the X and Y values here
Next

      

Applies To