Condividi tramite


Renderer.SetObjectTransform Method

Renderer.SetObjectTransform Method

Sets the Matrix Leave Site object that represents the object transform that is used to render ink.

Definition

Visual Basic .NET Public Sub SetObjectTransform( _
ByVal objectTransform As Matrix _
)
C# public void SetObjectTransform(
Matrix objectTransform
);
Managed C++ public: void SetObjectTransform(
Matrix *objectTransform
);

Parameters

objectTransform System.Drawing.Drawing2D.Matrix. The Matrix Leave Site object that represents the geometric transformation values—rotation, scaling, shear, and reflection—to use to transform the coordinates of the ink, using ink space coordinates.

Remarks

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

Object transformation occurs before view transformation.

Examples

[C#]

This C# example moves the ink in an InkOverlay object, theInkOverlay, to the right by 100 HIMETRIC units. The example gets the current object transform matrix from the Renderer object, applies a translation, and then sets it as the Renderer object's new object transform.

using System.Drawing.Drawing2D;
...
private void MoveRightBy100InkUnits()
{
    Matrix transformation = new Matrix();
    theInkOverlay.Renderer.GetObjectTransform(ref transformation);
    transformation.Translate(100, 0);
    theInkOverlay.Renderer.SetObjectTransform(transformation);
}
                

[VB.NET]

This Microsoft® Visual Basic® .NET example moves the ink in an InkOverlay object, theInkOverlay, to the right by 100 HIMETRIC units. The example gets the current object transform matrix from the Renderer object, applies a translation, and then sets it as the Renderer object's new object transform.

Imports System.Drawing.Drawing2D
...
Private Sub MoveRightBy100InkUnits()
    Dim transformation As New Matrix()
    theInkOverlay.Renderer.GetObjectTransform(transformation)
    transformation.Translate(100, 0)
    theInkOverlay.Renderer.SetObjectTransform(transformation)
End Sub             

See Also