Compartir a través de


Renderer.SetObjectTransform Method

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

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

Syntax

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

instance.SetObjectTransform(objectTransform)
public void SetObjectTransform (
    Matrix objectTransform
)
public:
void SetObjectTransform (
    Matrix^ objectTransform
)
public void SetObjectTransform (
    Matrix objectTransform
)
public function SetObjectTransform (
    objectTransform : Matrix
)
Not applicable.

Parameters

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

Example

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

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

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.GetObjectTransform
Renderer.GetViewTransform
Renderer.SetViewTransform