Compartilhar via


Renderer.GetViewTransform Method

Renderer.GetViewTransform Method

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

Definition

Visual Basic .NET Public Sub GetViewTransform( _
ByRef viewTransform As Matrix _
)
C# public void GetViewTransform(
ref Matrix viewTransform
);
Managed C++ public: void GetViewTransform(
Matrix **viewTransform
);

Parameters

viewTransform System.Drawing.Drawing2D.Matrix.

Remarks

The transformation applies to both the points and pen width.

View transformation occurs after object transformation.

Examples

[C#]

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

[VB.NET]

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
                

See Also