Share via


Renderer.Scale Method (Single, Single)

Scales the GetViewTransform in the X and Y dimensions. The scaling factor is applied to the width of the drawing attributes of the ink.

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

Syntax

'Declaration
Public Sub Scale ( _
    scaleX As Single, _
    scaleY As Single _
)
'Usage
Dim instance As Renderer 
Dim scaleX As Single 
Dim scaleY As Single

instance.Scale(scaleX, scaleY)
public void Scale(
    float scaleX,
    float scaleY
)
public:
void Scale(
    float scaleX, 
    float scaleY
)
public function Scale(
    scaleX : float, 
    scaleY : float
)

Parameters

  • scaleX
    Type: System.Single

    The factor to scale the X dimension of the ink in the view transform.

  • scaleY
    Type: System.Single

    The factor to scale the Y dimension of the ink in the view transform.

Remarks

This overload automatically applies the scale factors to the width of the drawing attributes of the ink. To choose whether or not to apply scaling factors to the width of the ink, use the Scale(Single, Single, Boolean) overload of this method.

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

Scale Overload

Microsoft.Ink Namespace

Renderer.GetViewTransform

Stroke.Scale

Strokes.Scale