// Line.cpp: implementation of the CLine class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "sktch.h"
#include "Line.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
IMPLEMENT_SERIAL(CLine,CObject,1)
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CLine::CLine()
{
}
CLine::CLine(CPoint ptFrom, CPoint ptTo)
{
m_ptold=ptFrom;
m_pt=ptTo;
}
CLine::~CLine()
{
}
void CLine::Draw(CDC *pDC)
{
pDC->MoveTo(m_ptold);
pDC->LineTo(m_pt);
}
void CLine::Serialize(CArchive &ar)
{
if (ar.IsStoring())
{
// TODO: add storing code here
ar<<m_ptold<<m_pt;
}
else
{
// TODO: add loading code here
ar>>m_ptold>>m_pt;
}
}