Share via


Renderer.GetViewTransform 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 GetViewTransform ( _
    ByRef viewTransform As Matrix _
)
'Usage
Dim instance As Renderer
Dim viewTransform As Matrix

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

Parameters

  • viewTransform
    The Matrix object that represents the object transform that was used to render ink.

Remarks

The transformation applies to both the points and pen width.

View transformation occurs after object transformation.

Example

This C# example scales the ink in an InkOverlay object, theInkOverlay, by a factor of 1.5. It gets the current view transform matrix from the Renderer object, applies the scaling, and then sets it as the Renderer object's new view transform. Note that the pen width also increases by a factor of 1.5.

using System.Drawing.Drawing2D;
...
        private void ZoomBy150percent()
        {
            Matrix transformation = new Matrix();
            theInkOverlay.Renderer.GetViewTransform(ref transformation);
            transformation.Scale(1.5f, 1.5f);
            theInkOverlay.Renderer.SetViewTransform(transformation);
        }

This Microsoft® Visual Basic® .NET example scales the ink in an InkOverlay object, theInkOverlay, by a factor of 1.5. It gets the current view transform matrix from the Renderer object, applies the scaling, and then sets it as the Renderer object's new view transform. Note that the pen width also increases by a factor of 1.5.

Imports System.Drawing.Drawing2D
...
Private Sub ZoomBy150percent()
    Dim transformation As New Matrix()
    theInkOverlay.Renderer.GetViewTransform(transformation)
    transformation.Scale(1.5, 1.5)
    theInkOverlay.Renderer.SetViewTransform(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.SetViewTransform
Renderer.GetObjectTransform
Renderer.SetObjectTransform