Rotate Method [InkTransform Class]

Rotate Method [InkTransform Class]

Changes the amount, measured in degrees, to change the rotation factor of the InkTransform object and optionally the center point of the rotation.



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] _



[in] The degrees by which to rotate clockwise. Without the optional x and y arguments, rotation takes place around the origin point, which by default is the upper left corner of the ink collection area to which the transform is applied.


[in, optional] The x-coordinate of the point in ink space coordinates around which rotation occurs.


[in, optional] The y-coordinate of the point in ink space coordinates around which rotation occurs.

Return Value

HRESULT valueDescription
E_INK_EXCEPTIONAn exception occurred inside the method.


The center point defaults to the origin.


[Visual Basic 6.0]

This Visual Basic 6.0 example shows a button handler that rotates the ink clockwise on the form around a point at (4000, 4000) in ink space coordinates.

Option Explicit
Dim theInkCollector As InkCollector

Private Sub Command1_Click()
    Dim theInkTransform As New InkTransform
    theInkCollector.Renderer.GetObjectTransform theInkTransform
    theInkTransform.Rotate 45!, 4000!, 4000!
    theInkCollector.Renderer.SetObjectTransform theInkTransform
End Sub

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

Applies To