From Xojo Documentation

Revision as of 17:36, 11 August 2019 by Gperlman (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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)