You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
|
#include "stdafx.h"
|
|
|
|
|
|
#include "SigmaView.h"
|
|
|
|
|
|
#include "SectionDoc.h"
|
|
|
|
|
|
#include "ItemArc.h"
|
|
|
|
|
|
//<2F><><EFBFBD>ļ<EFBFBD>ָ<EFBFBD><D6B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD>ҡ<EFBFBD><D2A1><EFBFBD><EFBFBD>νӿ<CEBD>
|
|
|
|
|
|
|
|
|
|
|
|
static CItemArc * getItemArc(CSigmaView * pView)
|
|
|
|
|
|
{
|
|
|
|
|
|
CItem * pItem = pView->GetItem();
|
|
|
|
|
|
if (pItem == NULL)
|
|
|
|
|
|
return NULL;
|
|
|
|
|
|
|
|
|
|
|
|
CItemArc * arcItem = dynamic_cast<CItemArc *>(pItem);
|
|
|
|
|
|
|
|
|
|
|
|
return arcItem;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//type <20><><EFBFBD>Ƶ<EFBFBD>ͼԪ<CDBC><D4AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 0--Բ<><D4B2> 1--<2D><> 2--<2D><><EFBFBD><EFBFBD>
|
|
|
|
|
|
extern "C" __declspec(dllexport)
|
|
|
|
|
|
int Arc_SetType(CSigmaView * pView, int type)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (pView == NULL)
|
|
|
|
|
|
return -1;
|
|
|
|
|
|
|
|
|
|
|
|
CItemArc * pItem = getItemArc(pView);
|
|
|
|
|
|
if (pItem == NULL)
|
|
|
|
|
|
return -1;
|
|
|
|
|
|
|
|
|
|
|
|
if (type == 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
pItem->SetState(CArc::drawArc);
|
|
|
|
|
|
return 1;
|
|
|
|
|
|
}
|
|
|
|
|
|
else if (type == 1)
|
|
|
|
|
|
{
|
|
|
|
|
|
pItem->SetState(CArc::drawChord);
|
|
|
|
|
|
return 1;
|
|
|
|
|
|
}
|
|
|
|
|
|
else if (type == 2)
|
|
|
|
|
|
{
|
|
|
|
|
|
pItem->SetState(CArc::drawPie);
|
|
|
|
|
|
return 1;
|
|
|
|
|
|
}
|
|
|
|
|
|
return -1;
|
|
|
|
|
|
}
|