?? line.cpp
字號:
// Line.cpp: implementation of the CLine class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "cad.h"
#include "Line.h"
#include<afxtempl.h>
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
IMPLEMENT_SERIAL(CLine,CObject,1)
CLine::CLine()
{
m_status=1;
m_next=1;
}
CLine::~CLine()
{
}
//DEL void CLine::DrawLine(CPoint pt1, CPoint pt2)
//DEL {
//DEL
//DEL }
CLine::CLine(CPoint pt1, CPoint pt2)
{
m_pt1=pt1;
m_pt2=pt2;
m_status=1;
m_next=1;
}
void CLine::DrawLine(CDC *pdc)
{
pdc->MoveTo(m_pt1);
pdc->LineTo(m_pt2);
}
//DEL void CLine::Serialize()
//DEL {
//DEL if()
//DEL
//DEL }
void CLine::Serialize(CArchive &ar)
{
if(ar.IsStoring()) ar<<m_pt1<<m_pt2<<m_next<<m_status;
else ar>>m_pt1>>m_pt2>>m_next>>m_status;
}
bool CLine::isempty()
{
if(m_pt1.x==m_pt2.x==m_pt1.y==m_pt2.y==0)
return TRUE;
else return FALSE;
}
void CLine::Empty()
{
m_pt1.x=m_pt2.x=m_pt1.y=m_pt2.y=0;
}
int CLine::GetStatus()
{
return m_status;
}
void CLine::SetNext(int i)
{
m_next=i;
}
int CLine::GetNext()
{
return m_next;
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -