Share via


SetTransform Method (Automation Only)

SetTransform Method (Automation Only)

Sets the InkTransform member data.

An InkTransform object represents a 3×3 matrix that, in turn, represents an affine transformation. The object stores only six of the nine numbers in a 3×3 matrix because all 3×3 matrices that represent affine transformations have the same third column (0, 0, 1).

Declaration

[C++]

        HRESULT SetTransform(
    [in] float eM11,
    [in] float eM12,
    [in] float eM21,
    [in] float eM22,
    [in] float eDx,
    [in] float eDy
);
      

[Microsoft® Visual Basic® 6.0]

        Public Sub SetTransform( _
    eM11 As Single, _
    eM12 As Single, _
    eM21 As Single, _
    eM22 As Single, _
    eDx As Single, _
    eDy As Single _
)
      

Parameters

eM11

[in] The element in the first row, first column.

eM12

[in] The element in the first row, second column.

eM21

[in] The element in the second row, first column.

eM22

[in] The element in the second row, second column.

eDx

[in] The element in the third row, first column.

eDy

[in] The element in the third row, second column.

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 calls SetTransform in the event handler for a command button to modify the object transform to rotate the ink 180 degrees around the point (4000, 4000) in ink space.

        Option Explicit
Dim theInkCollector As InkCollector

Private Sub Command1_Click()
    Dim theInkTransform As New InkTransform
    'Rotate the ink through 180 degrees around (4000, 4000)
    theInkTransform.SetTransform -1!, 0!, 0!, -1!, 8000!, 8000!
    theInkCollector.Renderer.SetObjectTransform theInkTransform
    Form1.Refresh
End Sub

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

Applies To