#ifndef _TGLINEAXISCREATOR_H__ #define _TGLINEAXISCREATOR_H__ #if _MSC_VER > 1000 #pragma once #endif #include "afxtempl.h" class KTLineAxisCreator { public: KTLineAxisCreator(); virtual ~KTLineAxisCreator(); void Create(BOOL bForPreview = FALSE); int GetAxisEntities(AcDbVoidPtrArray& arEntPtrs); void SetStartAngle(double dAngle); void InsertOffset(int nIndex, double dOffset); void SetArrayData(int nIndex, const CStringArray &arSpaceText); AcGePoint3d basePoint(); int m_arDirNum[4]; // 上下开及左右进的数量,用来显示不同颜色 // 0--上开(包括两条终了线) // 1--上开 + 下开 // 2--上开 + 下开 + 左进(包括两条终了线) // 3--上开 + 下开 + 左进 + 右进 private: BOOL IsTwoInOne(double dCurLen, int nComIndex); void PushToArray(int nIndex, CString strSrc); void CreateXAxis(); void CreateYAxis(); void CreateSYAxis(AcGeVector3d vtXAxis, AcGeVector3d vtYAxis); void CreateBYAxis(AcGeVector3d vtXAxis, AcGeVector3d vtYAxis); void CreateInsertMark(); double GetSingleDist(); double GetLast(int nIndex); private: BOOL m_bForPreview; double m_dAngle; double m_dTotalXWidth; double m_dTotalYWidth; AcDbVoidPtrArray m_arEntPtrs; CArray m_arDist[4]; }; #endif //_TGLINEAXISCREATOR_H__