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 function GetViewTransform(
    viewTransform : Matrix
)

Parameters

Remarks

The transformation applies to both the points and pen width.

View transformation occurs after object transformation.

Examples

In this example, the GetViewTransform is used to obtain the current view transform matrix from the Renderer object in an InkOverlay object. Then a scaling factor of 2 in both the X and Y dimensions is applied. Finally, the SetViewTransform method is used to restore the original view transform.

' create a Matrix object and obtain the current view transform 
Dim origViewTransform As Matrix = New Matrix()
mInkOverlay.Renderer.GetViewTransform(origViewTransform)
' scale the ink - this affects the view transform
mInkOverlay.Renderer.Scale(2.0F, 2.0F)
' later, you can restore the view transform back to the original
mInkOverlay.Renderer.SetViewTransform(origViewTransform)
// create a Matrix object and obtain the current view transform
Matrix origViewTransform = new Matrix();
mInkOverlay.Renderer.GetViewTransform(ref origViewTransform);
// scale the ink - this affects the view transform
mInkOverlay.Renderer.Scale(2.0f, 2.0f);
// later, you can restore the view transform back to the original
mInkOverlay.Renderer.SetViewTransform(origViewTransform);

Platforms

Windows 7, Windows Vista, Windows Server 2008 R2, Windows Server 2008

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Version Information

.NET Framework

Supported in: 3.0

See Also

Reference

Renderer Class

Renderer Members

Microsoft.Ink Namespace

Renderer.SetViewTransform

Renderer.GetObjectTransform

Renderer.SetObjectTransform