Share via


Renderer.GetObjectTransform Method

Renderer.GetObjectTransform Method

Identifies the Matrix Leave Site object that represents the object transform that was used to render ink.

Definition

Visual Basic .NET Public Sub GetObjectTransform( _
ByRef objectTransform As Matrix _
)
C# public void GetObjectTransform(
ref Matrix objectTransform
);
Managed C++ public: void GetObjectTransform(
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 stroke coordinates within the ink space.

Remarks

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

Object transformation occurs before view transformation.

Examples

[C#]

This C# example is a subroutine that moves the ink in an InkOverlay object, theInkOverlay, to the right by 100 ink 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 is a function that moves the ink in an InkOverlay object, theInkOverlay, to the right by 100 ink 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