Xojo.Core.Point.Subtract

From Xojo Documentation

Method

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

Supported for all project types and targets.

Use the subtraction operator (-) to subtract the coordinates of two points to get a new Point.

Sample Code

Subtract two points to get a new point:

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

Var p3 As Xojo.Core.Point
p3 = p1 - p2 // p3 is (40, 40)