Xojo.Core.Rect.Offset

From Xojo Documentation

Method

Xojo.Core.Rect.Offset(DeltaX As Integer, DeltaY As Integer) As Xojo.Core.Rect

Supported for all project types and targets.

A new rect offset by the specified values.


Method

Xojo.Core.Rect.Offset(Delta As Xojo.Core.Point) As Xojo.Core.Rect

Supported for all project types and targets.

A new rect offset by the specified delta point.

Sample Code

Dim rect1 As New Xojo.Core.Rect(10, 10, 100, 100)
Dim rect2 As Xojo.Core.Rect
rect2 = rect1.Offset(50, 50)
Dim rect1 As New Xojo.Core.Rect(10, 10, 100, 100)
Dim p As New Xojo.Core.Point(50, 50)
Dim rect2 As Xojo.Core.Rect
rect2 = rect1.Offset(p)