RMC_COPolygon function.
Add a CustomObject Polygon or alter an existing CustomObject.

Syntax
nResult (LONG) = RMC_COPolygon(
ByVal nCtrlId (LONG),
ByVal nCOIndex (LONG),
ByRef nXPoints (LONG),
ByRef nYPoints (LONG),
ByVal nPointsCount (LONG),
Optional ByVal nBGColor (LONG),
Optional ByVal nLineColor (LONG)
Optional ByVal nAsSpline (LONG)
Optional ByVal nTransparency (LONG)
)
Parameter
nCtrlId (LONG)
Unique ID of the chart control.
nCOIndex (LONG)
Index of the CustomObject. If a CustomObject with this index exists, it will be overwritten, if not, a new CustomOject will be created.
nXPoints (LONG)
The first element of an one-dimensional array, which holds the X points for the polygon. This array must have the same number of elements as the one for the Y points.
nYPoints (LONG)
The first element of an one-dimensional array, which holds the Y points for the polygon. This array must have the same number of elements as the one for the X points.
nPointsCount (LONG)
Number of elements in each X- and Y-points array.
nBGColor (LONG)
Color for the background of the Polygon as a Color...constant or as a RGB value. If omitted or 0, only the border of the Polygon gets painted without filling the background.
nLineColor (LONG)
Color for the border of the Polygon as a Color...constant or as a RGB value. If omitted or 0: in case, nBGColor is set, no border gets painted, otherwise the Polygon gets a Blue border.
nAsSpline (LONG)
If TRUE, the polygon will be painted as a Spline.
nTransparency (LONG)
Level of transparency for the background of the Polygon. Only valid, if nBGColor is set. Valid values from 1 (totally transparent) to 255 (opaque). If omitted or 0: no transparency.
Return value
0
No error, function succeeded.
RMC_ERROR_CTRLID
Wrong control ID (0 or no chart with this control ID was found).
RMC_ERROR_CUSTOMINDEX
Parameter nCOIndex is not valid (either 0 or it exceeds the maximum number of CustomObjects (200).
RMC_ERROR_ALLOC
Error while allocating memory for the CustomObject.