共用方式為


Rotate Method [IInkStrokeDisp Interface, InkStrokes Collection]

Rotate Method [IInkStrokeDisp Interface, InkStrokes Collection]

Rotates the ink using an angle in degrees around a center point of the rotation.

Declaration

[C++]

HRESULT Rotate (
    [in] float degrees,
    [in, optional, defaultvalue(0)] float x,
    [in, optional, defaultvalue(0)] float y
);

[Microsoft® Visual Basic® 6.0]

Public Sub Rotate( _
    degrees As Single, _
    [x As Single], _
    [y As Single] _
)

Parameters

degrees

[in] The degrees by which to rotate clockwise.

x

[in, optional] The x-coordinate of the point in ink space coordinates around which to rotate. Default is the origin.

y

[in, optional] The y-coordinate of the point in ink space coordinates around which to rotate. Default is the origin.

Return Value

HRESULT value Description
S_OK Success.
E_INK_EXCEPTION An exception occurred inside the method.

Example

[Visual Basic 6.0]

This Visual Basic 6.0 example applies a rotation of 60 degrees to the InkStrokes collection in the InkCollector, theInkCollector, centered on a point at (600, 600).

Option Explicit
Dim theInkCollector As InkCollector

Private Sub Command1_Click()
    theInkCollector.Ink.Strokes.Rotate 60, 600, 600
    Form1.Refresh
End Sub

Private Sub Form_Load()
    Set theInkCollector = New InkCollector
    theInkCollector.hWnd = Me.hWnd
    theInkCollector.Enabled = True
End Sub

Applies To