CDrawNode* pDrawNode=(CDrawNode*)pView->GetDocument()->m_objects.GetNext(circlepos);
if(pDrawNode!=NULL)
{
if(nIndex==pDrawNode->GetObjIndex())
{//计算箭线的新位置
if(abs(length)<abs(width)&&width<0)
deltarect.TopLeft()=pDrawNode->GetHandle(4);
if(abs(length)<abs(width)&&width>0)
deltarect.TopLeft()=pDrawNode->GetHandle(8);
if((abs(length)>abs(width)&&width>0&&length<0)|| (abs(length)>abs(width)&&width<0&&length<0))
deltarect.TopLeft()=pDrawNode->GetHandle(6);
if((abs(length)>abs(width)&&length>0&&width>0)||
(abs(length)>abs(width)&&length>0&&width<0))
deltarect.TopLeft()=pDrawNode->GetHandle(2); }}i++;}}}
pDrawObj->MoveTo(deltarect,pView);
}
if(Index==pDrawObj->m_BackConnect)
{//节点是箭线终节点
CRect deltarect=pDrawObj->m_position;
deltarect.TopLeft()+=delta;
int length=deltarect.top-deltarect.bottom;
int width=deltarect.left-deltarect.right;
if(abs(length)<abs(width)&&width<0)
deltarect.TopLeft()=pDrawCircle->GetHandle(4);
if(abs(length)<abs(width)&&width>0)
deltarect.TopLeft()=pDrawCircle->GetHandle(8);
if((abs(length)>abs(width)&&width>0&&length<0)|| (abs(length)>abs(width)&&width<0&&length<0))
deltarect.TopLeft()=pDrawCircle->GetHandle(6);
if((abs(length)>abs(width)&&length>0&&width>0)||
(abs(length)>abs(width)&&length>0&&width<0))
deltarect.TopLeft()=pDrawCircle->GetHandle(2); int nIndex=pDrawObj->m_ForeConnect;
|