Compartir a través de


Renderer.GetObjectTransform Method

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

Namespace: Microsoft.Ink
Assembly: Microsoft.Ink (in microsoft.ink.dll)

Syntax

'Declaration
Public Sub GetObjectTransform ( _
    ByRef objectTransform As Matrix _
)
'Usage
Dim instance As Renderer
Dim objectTransform As Matrix

instance.GetObjectTransform(objectTransform)
public void GetObjectTransform (
    ref Matrix objectTransform
)
public:
void GetObjectTransform (
    Matrix^% objectTransform
)
public void GetObjectTransform (
    /** @ref */ Matrix objectTransform
)
Not applicable.

Parameters

  • objectTransform
    The Matrix 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.

Example

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);
}

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

Platforms

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

Version Information

.NET Framework

Supported in: 3.0

See Also

Reference

Renderer Class
Renderer Members
Microsoft.Ink Namespace
Renderer.SetObjectTransform
Renderer.GetViewTransform
Renderer.SetViewTransform