Xojo.Core.Rect.Inset

From Xojo Documentation

Method

Xojo.Core.Rect.Inset(deltaX As Double, deltaY As Double) As Xojo.Core.Rect

Supported for all project types and targets.

Returns a new rect with the same center, but each side inset by the given amount. Specify a negative value to grow the rectangle.

Sample Code

Var rect1 As New Xojo.Core.Rect(10, 10, 100, 100)
Var rect2 As Xojo.Core.Rect
rect2 = rect1.Inset(50, 50)