From Xojo Documentation

You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!

Xojo.Core.Point.Translate(deltaX As Double, deltaY As Double) As Xojo.Core.Point

Supported for all project types and targets.

Returns a new point by adding 'deltaX' to Self.X and 'deltaY' to Self.Y.

Sample Code

Create a new point that is 100 greater than the old point's X coordinate:

Var origPoint As New Point(50, 50)
Var newPoint As Point = origPoint.Translate(100, 0)