Contains(Point: IGxPointF): Boolean;
Contains(Point: IGxPointF): boolean;
Point.
The Contains property checks if the point is included into the object.
The property returns True if the point is included into the object, otherwise the property returns False.
This example assumes that there is the Chart object of the IChart type.
Add links to the Chart, Drawing, Ui system assemblies.
Sub UserProc;
Var
Chart: IChart;
Ser: IChartSerie;
point: IGxPointF;
b: Boolean;
Begin
Ser := Chart.Series.Item(0);
point := New GxPointF.Create(1, 1);
b := Ser.Contains(point);
If b Then WinApplication.InformationBox("The point is included into the series");
Else WinApplication.InformationBox("The point is not included into the series");
End If;
End Sub UserProc;
After executing the example the system displays a message informing whether the point is included into the series.
The requirements and result of the Fore.NET example execution match with those in the Fore example.
Imports Prognoz.Platform.Interop.Chart;
Imports Prognoz.Platform.Interop.Drawing;
Imports Prognoz.Platform.Interop.Ui;
…
Public Shared Sub Main(Params: StartParams);
Var
Chart: IChart;
Ser: IChartSerie;
point: GxPointF = New GxPointFClass();
b: Boolean;
WinAppCls: WinApplicationClass = New WinApplicationClassClass();
Begin
Ser := Chart.Series.Item[0];
b := Ser.Contains(point);
If b Then WinAppCls.InformationBox("The point is included into the series", Null);
Else WinAppCls.InformationBox("The point is not included into the series", Null);
End If;
End Sub;
See also: