From Xojo Documentation

Revision as of 17:37, 11 August 2019 by Gperlman (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!

Xojo.Core.Point.Operator_Add(p2 As Xojo.Core.Point) As Xojo.Core.Point

Supported for all project types and targets.

You can use the plus operator (+) to add the X and Y coordinates of the points together and get a new Point.

Sample Code

Adds two points together to get a new point:

Var p1 As New Xojo.Core.Point(50, 50)
Var p2 As New Xojo.Core.Point(25, 40)

Var p3 As Point = p1 + p2 // p3 is (75, 90)