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.

40 lines
1014 B
C++

#pragma once
#include "GlobalDefine.h"
//数据点的结构类型
class CDataPoint
{
public:
CDataPoint(Dbxy _pt);
CDataPoint(void);
~CDataPoint(void);
Dbxy GetPt(){return m_pt;};
void SetPt(Dbxy pt){m_pt = pt;};
CPoint GetDevicePt();
void Operate(SObjOperatePar &par);
bool IsNode(){return m_bIsNode;};
void SetIsNode(bool bIsNode){m_bIsNode = bIsNode;};
bool Equal(CDataPoint &pt);
private:
void Move(double MoveX,double MoveY);
void Mirror(Dbxy pt,X_OR_Y xy);
void Rotato(Dbxy pt,double Angle);
void Stretch(Dbxy BasePt,double Size,double MaxStep,X_OR_Y xy);
private:
Dbxy m_pt;//坐标值
bool m_bIsNode;//是否为节点
};
class DbLine
{
public:
DbLine(CDataPoint pt1,CDataPoint pt2):m_pt1(pt1),m_pt2(pt2){};
~DbLine(void){};
bool IsSerialLine(DbLine &line);
Dbxy GetPt1(){return m_pt1.GetPt();};
Dbxy GetPt2(){return m_pt2.GetPt();};
public:
CDataPoint m_pt1;
CDataPoint m_pt2;
};