ExtendInfoIdentify.h
上传用户:hell82222
上传日期:2013-12-19
资源大小:1872k
文件大小:3k
- // ExtendInfoIdentify.h: interface for the CExtendInfoIdentify class.
- //
- //////////////////////////////////////////////////////////////////////
- #if !defined(AFX_EXTENDINFOIDENTIFY_H__381CBC70_66DE_46D3_8C6F_25F387F49A97__INCLUDED_)
- #define AFX_EXTENDINFOIDENTIFY_H__381CBC70_66DE_46D3_8C6F_25F387F49A97__INCLUDED_
- #if _MSC_VER > 1000
- #pragma once
- #endif // _MSC_VER > 1000
- /********************************
- 作者:徐灵甫
- 日期:2002。12。24
- 说明:扩展信息智能识别类的头文件
- //********************************/
- #include <afxtempl.h>
- #include "KmShare.h"
- #include "CShow.h"
- class KmBuffer;
- class CKmDataManager;
- class KmLegend;
- class CWordStyle;
- class CCellInfo
- {
- public:
- CCellInfo();
- CCellInfo(CCellInfo& cCellInfo);
- ~CCellInfo();
- public:
- void Zoom(double dScale);
- void Move(KmPoint ptOffset);
- BOOL IsSurround(KmBuffer* pData);
- void SetData(KmBuffer* pData,BOOL &bWordStyle,CWordStyle& ws);
- public://左下角为基准点
- CString m_strCellInfo;
- CString m_strCellData;
- KmRect m_cRect;
- };
- class CProductInfo
- {
- public:
- CProductInfo();
- ~CProductInfo();
- public:
- BOOL LoadFromFile(CString strFileName);
- public:
- KmPoint m_ptRightBottom; //右下角
- double m_dBiaoTiHight; //标题栏高度
- double m_dBiaoTiWidth; //标题栏宽度
- double m_dMingXiBottomHight;//明细底栏高度
- double m_dMingXiHight; //明细栏高度
- double m_dMingXiWidth; //明细栏宽度
- CArray<CCellInfo,CCellInfo>m_aBiaoTi; //标题栏CELL
- CArray<CCellInfo,CCellInfo>m_aMingXiBottom; //明细底栏CELL
- CArray<CCellInfo,CCellInfo>m_aMingXi; //明细栏CELL
- CArray<CCellInfo,CCellInfo>m_aMingXiTemp; //明细栏CELL
- public:
- void SetBaseInfo(KmPoint ptRightBottom,double dShowScale);
- void SetHaveBiaoTi(BOOL bHaveBiaoTi);
- void SetMingXiBottom();
- void SetMingXi(int ix,int iy);
- private:
- BOOL m_bHaveBiaoTi;
- };
- class CExtendInfoIdentify
- {
- public:
- CExtendInfoIdentify(KmBuffer* pExtendInfoSource);
- virtual ~CExtendInfoIdentify();
- public:
- //从数据库创建扩展信息分析源集合的函数
- static KmBuffer* CreateExtendInfoSourceBuffer(CKmDataManager* pDataManager,BOOL &bRected,KmRect &rectOutSide);
- private:
- KmBuffer* m_pExtendInfoSource;
- public:
- BOOL IdentifyLegend(KmLegend* &pLegend,double& dShowScale,KmPoint& ptRightBottom);
- BOOL IdentifyProductInfo(double dShowScale,KmPoint ptRightBottom,CKmDataManager* pDataMgr);
- private:
- BOOL calculate_check_boundary(int up_line, int down_line,int right_line, int left_line );
- static void calculate_text_boundary(S_TEXT* &pText);
- };
- #endif // !defined(AFX_EXTENDINFOIDENTIFY_H__381CBC70_66DE_46D3_8C6F_25F387F49A97__INCLUDED_)