Contains(Point: IGxPointF): Boolean;
Contains(Point: IGxPointF): boolean;
Point.
The Contains property checks whether the point is included into the object.
This property returns True if the object contains this point, otherwise the property returns False.
This example assumes that there is the Chart object of the IChart type.
Add reference to 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 sereis");
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 belongs to the series.
Requirements and the result of execution of the Fore.NET example are similar to 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: