Share via


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 function SetObjectTransform(
    objectTransform : Matrix
)

Parameters

  • objectTransform
    Type: System.Drawing.Drawing2D.Matrix

    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.

Examples

In this example, the GetObjectTransform is used to obtain the current object 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. Because false is passed to the applyOnPenWidth parameter, the width of the Ink is not scaled. Finally, the SetObjectTransform method is used to restore the original object transform.

' create a Matrix object and obtain the current object transform 
Dim origObjectTransform As Matrix = New Matrix()
mInkOverlay.Renderer.GetObjectTransform(origObjectTransform)
' scale the ink (without scaling the ink width)- this affects the object transform
mInkOverlay.Renderer.Scale(2.0F, 2.0F, False)
' later, you can restore the object transform back to the original
mInkOverlay.Renderer.SetObjectTransform(origObjectTransform)
// create a Matrix object and obtain the current object transform
Matrix origObjectTransform = new Matrix();
mInkOverlay.Renderer.GetObjectTransform(ref origObjectTransform);
// scale the ink (without scaling the ink width)- this affects the object transform
mInkOverlay.Renderer.Scale(2.0f, 2.0f, false);
// later, you can restore the object transform back to the original
mInkOverlay.Renderer.SetObjectTransform(origObjectTransform);

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.GetObjectTransform

Renderer.GetViewTransform

Renderer.SetViewTransform