AnnBoundingRect... Example for Visual C++
ILEADRasterVariant * pltRasVarX = NULL;
ILEADRasterVariant * pltRasVarY = NULL;
CoCreateInstance(CLSID_LEADRasterVariant, NULL, CLSCTX_ALL,
IID_ILEADRasterVariant, (void **)&pltRasVarX);
CoCreateInstance(CLSID_LEADRasterVariant, NULL, CLSCTX_ALL,
IID_ILEADRasterVariant, (void **)&pltRasVarY);
pltRasVarX->Type = VALUE_ARRAY_FLOAT;
pltRasVarY->Type = VALUE_ARRAY_FLOAT;
pltRasVarX->ItemCount = 4;
pltRasVarY->ItemCount = 4;
long hObj = m_pRasterAnn->AnnCreateItem(m_pRasterAnn->GetAnnContainer(), ANN_OBJECT_PROTRACTOR, TRUE);
long hObj2 = m_pRasterAnn->AnnCreateItem (m_pRasterAnn->GetAnnContainer (), ANN_OBJECT_POLYGON, TRUE);
pltRasVarX->LongItemValue (1) = 10;
pltRasVarX->LongItemValue (2) = 100;
pltRasVarX->LongItemValue (3) = 200;
pltRasVarY->LongItemValue (1) = 20;
pltRasVarY->LongItemValue (2) = 200;
pltRasVarY->LongItemValue (3) = 100;
m_pRasterAnn->AnnSetPoints(hObj, pltRasVarX, pltRasVarY, 3);
pltRasVarX->LongItemValue (0) = 50;
pltRasVarY->LongItemValue (0) = 220;
m_pRasterAnn->AnnSetPoints(hObj2, pltRasVarX, pltRasVarY, 4);
m_pRasterAnn->AnnSetFillMode(hObj2, ANN_FILLMODE_OPAQUE, FALSE);
CString msg;
m_pRasterAnn->AnnBringToFront (hObj2);
msg.Format(TEXT("Polygon Area:%d\nProtractor Angle:%f"), m_pRasterAnn->AnnGetArea (hObj2), (double)m_pRasterAnn->AnnGetAngle (hObj));
::MessageBox(NULL, msg, TEXT("Brought Polygon to front"), MB_OK);
m_pRasterAnn->AnnSendToBack (hObj2);
msg.Format(TEXT("Protractor Bounding Rectangle, Left:%f, Top:%f, Width:%f, Height:%f") ,
(double)m_pRasterAnn->GetAnnBoundingRectLeft(hObj),
(double)m_pRasterAnn->GetAnnBoundingRectTop(hObj),
(double)m_pRasterAnn->GetAnnBoundingRectWidth(hObj),
(double)m_pRasterAnn->GetAnnBoundingRectHeight(hObj));
::MessageBox(NULL, msg, TEXT("Sent Polygon to back"), MB_OK);
m_pRasterAnn->AnnCut(hObj2, ANN_FMT_WMF, FALSE, TRUE);
pltRasVarX->Release ();
pltRasVarY->Release ();