C#语言,怎么添加多边形注释?

API文档是C++的接口描述。如果使用C#进行开发,添加多边形注释时可以参考如下示例代码:

private void AddAPlygonAnnot()
{
int PointsCount = 4;
float[] PointsArray = { 100, 200, 200, 200, 175, 100, 125, 100 };
IntPtr pointsArrayPtr = Marshal.AllocHGlobal(PointsArray.Length * sizeof(float));
Marshal.Copy(PointsArray, 0, pointsArrayPtr, PointsArray.Length);
FoxitPDFSDKProLib.PDFPageAnnots annots = axFoxitPDFSDK1.GetPageAnnots(0);
FoxitPDFSDKProLib.PDFAnnot annot = annots.AddAnnot(null, "Polygon", 100, 100, 200, 200);
annot.SetPolygonVertices((int)pointsArrayPtr, PointsCount);
}

呈现效果如下: