共用方式為


Rotate Method [InkRenderer Class]

Rotate Method [InkRenderer Class]

Applies a rotation to an InkRenderer's view transform.

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 zero.

y

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

Return Value

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

Remarks

If no point is specified, the rotation is centered around the origin.

Example

[Visual Basic 6.0]

This Visual Basic 6.0 example takes the InkRenderer object in the InkCollector, theInkCollector and applies a clockwise rotation of 60 degrees to it, centered on a point at (4000, 4000) in ink space, when a command button is clicked.

Option Explicit
Dim theInkCollector As InkCollector

Private Sub Command1_Click()
    theInkCollector.Renderer.Rotate 60!, 4000!, 4000!
    Form1.Refresh
End Sub

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

Applies To