KmgConverter.h
上传用户:hell82222
上传日期:2013-12-19
资源大小:1872k
文件大小:5k
- // KmgConverter.h: interface for the CKmgConverter class.
- //
- //////////////////////////////////////////////////////////////////////
- #if !defined(AFX_KMGCONVERTER_H__01EEF460_52CC_4030_9E29_9E00B48CD8BE__INCLUDED_)
- #define AFX_KMGCONVERTER_H__01EEF460_52CC_4030_9E29_9E00B48CD8BE__INCLUDED_
- #if _MSC_VER > 1000
- #pragma once
- #endif // _MSC_VER > 1000
- #include "Database.h"
- #include "Converter.h"
- #include "KmSection.h"
- #include "KmShare.h"
- #include "KmObject.h"
- #include "KmText.h"
- #include "KmSText.h"
- #include "CommandInfo.h"
- #include "KmMatch.h"
- class CShape;
- typedef struct tagENTKMGHEAD
- {
- int ilwidth;
- int icolor;
- int iltype;
- double dlscale;
- UINT idlayer;
- }ENTKMGHEAD;
- class CKmgConverter : public CConverter
- {
- public:
- CKmgConverter(CCommandInfo* pCommand);
- virtual ~CKmgConverter();
- public:
- CMap<int,int,int,int> m_aLayerStatus;//备份层的状态。 FROZEN OFF
- void SaveLayerStatus();
- void LoadLayerStatus();
- void ResetLayerStatus();
- double m_dSysDimScale;
- BOOL BeginConverter();
- BOOL EndConverter();
-
- BOOL SetDataVessel(int dVessel,DWORD dwKmID=0);
- int GetDataVessel(DWORD& dwKmID);
- void WriteEnthead(int ilwidth,int icolor,int iltype,double dlscale,UINT idlayer);
- void WriteEnthead(int icolor,int iltype);
- BOOL SaveAndReinitDataBase(UINT utDimStyleReplace,CString strfilename,BOOL bModel=TRUE);
- void UniteModelToSpace(double xoffset,double yoffset,double zoffset,double scale,double minx,double miny,double maxx,double maxy,int mode);
- BOOL CheckNoUseBlock(DWORD dwKmID);
- public:
- void Calculate_ChangeFont(CWordStyle* pWordStyle);
- DWORD ConverterEnthead_Layer(BOOL bOn,BOOL bFrozen,CString strName,int icolor,int ilwidth,int iltype);
- DWORD ConverterEnthead_Blockdefine(CString strName,CString strDescription);
- void ConverterEnthead_XrefBlock(DWORD dwid,double x1,double y1,double z1,CString XrefPath);
- UINT ConverterEnthead_Dimstyle(PAD_DIMSTYLE dimstyle,CArray<int,int>& acolor,int iLWidthDefault,CMatchList5& ashape,BOOL bAdjusted,double dTextHeight,double dArrowSize,double dDimValueRate,UINT utWordStyle);
- UINT ConverterEnthead_Dimstyle(CDimStyle cdimstyle,BOOL bAdjusted,double dTextHeight,double dArrowSize,double dDimValueRate,UINT utWordStyle);
- KMOBJECTID ConverterEntiey_KmObject(KmObject* pObj);
- KMOBJECTID ConverterEntiey_KmLine(double x1,double y1,double z1,double x2,double y2,double z2);
- KMOBJECTID ConverterEntiey_KmCircle(double x1,double y1,double z1,double ra);
- KMOBJECTID ConverterEntiey_KmEllipse(double x1,double y1,double z1,double lr,double sr,double angle,BOOL b90Mirror);
- KMOBJECTID ConverterEntiey_KmEllipseArc(double x1,double y1,double z1,double lr,double sr,double angle,double ba,double ea,BOOL b90Mirror);
- KMOBJECTID ConverterEntiey_KmArc(double x1,double y1,double z1,double radius,double ba,double ea);
- KMOBJECTID ConverterEntiey_KmSPline(int mode,AD_VMADDR ldblob,unsigned short numknots,unsigned short numctlpts,unsigned short numfittps);
- KMOBJECTID ConverterEntiey_KmBlockref(double x1,double y1,double z1,double xs,double ys,double zs,double ra,DWORD id,BOOL b90Mirror);
- BOOL ConverterEntiey_KmBlockdef(double x1,double y1,double z1);
- KMOBJECTID ConverterEntiey_KmSText(CString strText,double x0,double y0,double z0,PAD_TDATA style,CShape* shape);
- KMOBJECTID ConverterEntiey_KmText(CString strEnter,double x0,double y0,double z0,double angle,double texthight,double widthhight, double spacehight,char flag,double height,double width,CShape* shape,double maxWidth);
- KMOBJECTID ConverterEntiey_KmText(BOOL btol,CString strEnter,double x0,double y0,double z0,double texthight,double angle,double width,double space,CShape* shape);
- KmText* ConverterEntiey_KmText(BOOL btol,double x0,double y0,double z0,double texthight,double angle,double width,double space,CShape* shape,CString strEnter);
- BOOL ConverterEntiey_KmString(KmText* pText,CString strText,UINT baseWS);
- BOOL ConverterEntiey_KmMString(KmText*pText,CString& strText,UINT baseWS,CUIntArray& aWSIDs,BOOL btol=FALSE,BOOL bdim=FALSE);
- BOOL ConverterEntiey_KmMString(CString& strText);
- BOOL ConverterEntiey_KmTString(KmText*pText,CString strEnter,UINT baseWS);
- void ConverterEntiey_KmArrow(double x1,double y1,double z1,double x2,double y2,double z2,double width);
- BOOL ConverterEntiey_KmArrowHead(double x1,double y1,double x2,double y2,double x3,double y3,double x4,double y4);
- BOOL ConverterEntiey_KmArrowHead(double x1,double y1,double x2,double y2,double dwidth);
- BOOL ConverterEntiey_KmBuffer(KmBuffer& buff,CString blockname,CString blockdescrip,KmPoint po);
- BOOL ConverterDbVar(KMDBVarID nID, VARIANT& var);
- BOOL ConverterPreSave_IndentifyExtendInfo();
- BOOL ConverterPreSave_KmLegend(BOOL bRected,KmRect rect);
- private:
- CCommandInfo* m_pCommand;
- ENTKMGHEAD m_enthead;
- int m_dDataVessel;
- CKmDataManager* m_pDataManager;
- CList<KmObject*,KmObject*>m_ModelSpace;
- KmBlockDef* m_pActiveBlockDef;
- private:
- KMOBJECTID AddObject(KmObject* pObj,BOOL bSetHead=TRUE);
- BOOL calculate_findpilechars(CString& strText);
- BOOL calculate_findtolchars(CString strText,int &i,char &symbl);
- char calculate_findtoltype(char symbl);
- BOOL calculate_findfont(CString& strFont);
- public:
- void ReActiveDataManager();
- short m_sCodePage;
- };
- #endif // !defined(AFX_KMGCONVERTER_H__01EEF460_52CC_4030_9E29_9E00B48CD8BE__INCLUDED_)