Resizes the rectangle.




void Resize(double w, double h)
void Resize(double w, double h, Corner corner)

[Visual Basic]
Sub Resize(w As Double, h As Double)
Sub Resize(w As Double, h As Double, corner as Corner)



Name Description
w The new width.
h The new height.
corner The corner to pin.




Changes the width and height of the rectangle while maintaining the position.

When you change the width or height of a rectangle one corner of the rectangle is pinned to maintain position. The corner which is pinned is indicated by the Pin property but you can override this default by specifying a corner when calling this function.




The following code.

XRect rc = new XRect();
rc.String = "20 20 220 120";
Response.Write("Rect = " + rc.String);
rc.Resize(50, 150);
Response.Write("Pos. = " + rc.String);

[Visual Basic]
Dim rc As XRect = New XRect()
rc.String = "20 20 220 120"
Response.Write("Rect = " + rc.String)
rc.Resize(50, 150)
Response.Write("Pos. = " + rc.String)

Produces the following output.

Rect = 20 20 220 120
Pos. = 20 20 70 170