ToPoint: IGxPoint;
The ToPoint method transforms the real point into the integer point.
During the transformation, the fractional part of point coordinates is removed.
Sub UserProc;
Var
PointF: IGxPointF;
Point: IGxPoint;
Begin
PointF := New GxPointF.Create(10.5, 15.5);
Point := PointF.ToPoint;
Debug.WriteLine("X: " + Point.X.ToString + ". Y: " + Point.Y.ToString);
End Sub UserProc;
After executing the example a real point is created. Then the point is transformed into an integer point. The obtained coordinates of integer point are displayed in the development environment console.
See also: