#ifndef TRACKINLITH_H #define TRACKINLITH_H #pragma once ////////////////////////////////////////////////////////////////////////////// //主要功能: // 岩性符号类 单个符号组 ///////////////////////////////////////////////////////////////////////////// //岩性对象 class CInTrackDepthSegment; class AFX_EXT_CLASS CInTrackLith : public CInTrackDepthSegment { protected: //DECLARE_SERIAL(CInTrackLith); public: CInTrackLith(const CRect8& position); CInTrackLith(); virtual ~CInTrackLith(); CLONE_WELLOBJECT(CInTrackLith) virtual void operator=(CInTrackLith& object); public: CString m_strLith; //岩性名称 CString m_strLithCode; //岩性代码 CString m_strOilGas; //含油气性 CString m_strClr; //颜色名称 CString m_strClrCode; //颜色代码 CString m_strFront; //岩性前缀 CString m_strContent; //含有物名称 CString m_strConstitution; //构造名称 CXy* m_pMarkLitho; //岩性符号指针 CXy* m_pMarkFront; //前缀符号指针 CXy* m_pMarkOilGas; //油气性符号指针 protected: DWORD m_nTrackInLithFlags;//岩性开关状态 // 曲线道Flags enum TrackInCurveFlags { TrackInLithFlagBackClr = 0x0001, // 填充背景色 }; void Init(); // Implementation public: virtual void Draw(CXyDC* pDC); virtual void DrawOilGas(CXyDC* pDC, CRect8 rect); virtual void DrawLith(CXyDC* pDC, CRect8 rect, CString strMark, CXy* pMark, double fOneH); virtual void DrawLithHalf(CXyDC* pDC, CRect8 trackrect, CRect8 rectLith,double fOneH); virtual void Serialize(CArchive& ar, const short &ver); //开关变量值 virtual void SetTrackInLithFlags(DWORD flags); virtual void SetShowBackColor(BOOL bFlag); virtual DWORD GetTrackInLithFlags(); virtual BOOL IsShowBackColor(); //拆分岩性 void SplitLith(CString strFull); //根据优先级得到岩性前缀符号名 CString GetMarkLithFront(); //获取斜井状态下岩性符号对应的左右井边界,供TrackLithObj computedata(),BuidChildObject()调用 2015-10-19 virtual bool CalcInclinedBorder(); virtual void DrawLithHalf(CXyDC* pDC, CRect8 rectLith,double fOneH,XFORM *pXform = NULL); //不需要判断是否在道内; 当旋转DC绘制符号时,需要旋转的矩阵xform void SetLithDataAndSymbol(CString strLith = "", CString strOilGas = "", CString strLithFront = "", CString strColor = ""); protected: //由岩性符号所在多边形绘制岩性符号 void DrawLithSymbols(CCurveEx& polyLith,CXyDC* pDC); //绘制斜井岩性道中岩性符号 void DrawInclined(CXyDC* pDC); void DrawLithRect(CXyDC *pDC,CRect8 rect); void MakeIncliendMark(); void transformLithSymbolForIncliendTrack(CXy* pLithXy, CCurveEx& leftBorder, CCurveEx& rightBorder, double sdep,double edep ,CRect8 markRange, CRect8 drawRect, CXy*& pIncliendMark); public: virtual int ReadPCG_SelfData(CKXmlParse& xp, const short& ver, CTrackObj* pTrack); virtual void WritePCG_SelfData(CFile &fw, int nBaseTabNum); int m_tLithNums; //斜井绘制岩性符号时,应该绘制的符号个数,绘制操作时的临时变量 protected: CXy* m_pIncliendGasOil; }; #endif