Share via


Stroke.ScaleToRectangle Method

Scales the Stroke object to fit in the specified Rectangle structure.

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

Syntax

'Declaration
Public Sub ScaleToRectangle ( _
    scaleRectangle As Rectangle _
)
'Usage
Dim instance As Stroke 
Dim scaleRectangle As Rectangle

instance.ScaleToRectangle(scaleRectangle)
public void ScaleToRectangle(
    Rectangle scaleRectangle
)
public:
void ScaleToRectangle(
    Rectangle scaleRectangle
)
public function ScaleToRectangle(
    scaleRectangle : Rectangle
)

Parameters

Remarks

The Stroke object is scaled and translated to match the Stroke object's bounding box to the rectangle.

Examples

This C# example calls the ScaleToRectangle method on the Stroke object, theStroke, passing in a Rectangle structure, theRectangle, as the parameter. The method scales and translates theStroke so its bounding box matches theRectangle.

theStroke.ScaleToRectangle(theRectangle);

This Microsoft Visual Basic .NET example calls the ScaleToRectangle method on the Stroke object, theStroke, passing in a Rectangle structure, theRectangle, as the parameter. The method scales and translates theStroke so its bounding box matches theRectangle.

theStroke.ScaleToRectangle(theRectangle)

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

Stroke Class

Stroke Members

Microsoft.Ink Namespace

Stroke.GetBoundingBox

Stroke.Scale

Stroke.Transform

Strokes.ScaleToRectangle