SetObjectTransform Method

SetObjectTransform Method

Sets the InkTransform object that represents the object transform that is used to render ink.

Declaration

[C++]

        HRESULT SetObjectTransform(
    [in] IInkTransform* objectTransform
);
      

[Microsoft® Visual Basic® 6.0]

        Public Sub SetObjectTransform( _
    objectTransform As InkTransform _
)
      

Parameters

objectTransform

[in] The InkTransform object that represents the geometric transformation — rotation, scaling, shear, and reflection — values to use to transform the stroke coordinates within the ink space.

A NULL (Nothing in Visual Basic 6.0) value for the objectTransform parameter correlates to the identity transform.

Return Value

HRESULT value Description
S_OK Success.
E_POINTER A parameter contained an invalid pointer.
E_INVALIDARG objectTransform does not point to a compatible InkTransform object.
E_INK_EXCEPTION An exception occurred inside the method.

Remarks

The transformation applies to the points, but not the pen width.

Object transformation occurs before view transformation.

Example

[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
    Form1.Refresh
End Sub

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

Applies To