Compartilhar via


Stroke.ScaleToRectangle Method

Stroke.ScaleToRectangle Method

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

Definition

Visual Basic .NET Public Sub ScaleToRectangle( _
ByVal scaleRectangle As Rectangle _
)
C# public void ScaleToRectangle(
Rectangle scaleRectangle
);
Managed C++ public: void ScaleToRectangle(
Rectangle *scaleRectangle
);

Parameters

scaleRectangle System.Drawing.Rectangle. The System.Drawing.Rectangle Leave Site 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.

Examples

[C#]

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

theStroke.ScaleToRectangle(theRectangle);
                

[VB.NET]

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

theStroke.ScaleToRectangle(theRectangle)
                

See Also