Freigeben über


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 void ScaleToRectangle (
    Rectangle scaleRectangle
)
public function ScaleToRectangle (
    scaleRectangle : Rectangle
)
Not applicable.

Parameters

  • scaleRectangle
    The Rectangle structure, in ink space coordinates, to which the Stroke object is scaled.

Remarks

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

Example

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 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

Version Information

.NET Framework

Supported in: 3.0

See Also

Reference

Stroke Class
Stroke Members
Microsoft.Ink Namespace
Microsoft.Ink.Stroke.GetBoundingBox
Stroke.Scale
Microsoft.Ink.Stroke.Transform
Strokes.ScaleToRectangle