⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 line.cpp

📁 显示地震剖面对地震专业的学生来说显示地震剖面特别重要本程序实现了地震剖面的绘制
💻 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;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -