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.
30 lines
624 B
C++
30 lines
624 B
C++
#include "StdAfx.h"
|
|
#include ".\itemrectangle.h"
|
|
#include "SigmaDoc.h"
|
|
#include "SigmaView.h"
|
|
|
|
CItemRectangle::CItemRectangle(CSigmaDoc * ppDoc)
|
|
: CItemFocusRect(ppDoc)
|
|
{
|
|
typeIndex = 0;
|
|
this->SetType(ITEM_RECTANGLE);
|
|
EnableRButtonCancel(TRUE);
|
|
}
|
|
|
|
CItemRectangle::~CItemRectangle(void)
|
|
{
|
|
}
|
|
|
|
void CItemRectangle::DoLButtonUp(CDC* pDC)
|
|
{
|
|
if(GetDoc()->GetDraw()==NULL) return;
|
|
|
|
CRect8 rect=this->GetRect();
|
|
|
|
CCurveEx *pCurve=new CCurveEx;
|
|
pCurve->CreateCurveFromRect(&rect);
|
|
POSITION pos=AddElement(pCurve,DOUBLEFOX_CURVE);
|
|
GetDC()->Create(pDC);
|
|
COne* pOne = GetDoc()->GetDraw()->GetAt(pos);
|
|
pOne->Draw(*GetDC());
|
|
} |