Bagikan melalui


Strokes.Scale Method

Scales the Strokes collection in the X and Y dimensions.

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 Strokes 
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 view transform.

  • scaleY
    Type: System.Single

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

Remarks

Zero-determinant transforms are not supported. This means that calling the Scale method with one of the scales set to zero is not supported.

Examples

In this example, a scaling factor of 2 in the X dimension and of 0.75 in the Y dimension is applied to the Strokes collection of an InkOverlay object.

' Access to the Strokes property returns a copy of the Strokes object. 
' This copy must be implicitly (via using statement) or explicitly 
' disposed of in order to avoid a memory leak. 
Using allStrokes As Strokes = mInkOverlay.Ink.Strokes
    allStrokes.Scale(2.0F, 0.75F)
End Using
// Access to the Strokes property returns a copy of the Strokes object. 
// This copy must be implicitly (via using statement) or explicitly 
// disposed of in order to avoid a memory leak. 
using (Strokes allStrokes = mInkOverlay.Ink.Strokes)
{
    allStrokes.Scale(2.0f, 0.75f);
}

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

Strokes Class

Strokes Members

Microsoft.Ink Namespace

Strokes.ScaleToRectangle

Strokes.Transform

Stroke.Scale