|
|
|
|
|
#pragma once
|
|
|
|
|
|
#include "ItemSelectPoint.h"
|
|
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
|
|
|
|
namespace NItem
|
|
|
|
|
|
{
|
|
|
|
|
|
#define DF_CALIBRATE_FOUR_POINT 0 //<2F>ĵ<EFBFBD>Уλ
|
|
|
|
|
|
#define DF_CALIBRATE_TWO_POINT 1 //<2F><><EFBFBD><EFBFBD>Уλ
|
|
|
|
|
|
#define DF_CALIBRATE_TO_RECT 2 //У<><D0A3>Ϊ<EFBFBD><CEAA><EFBFBD><EFBFBD>
|
|
|
|
|
|
#define DF_CALIBRATE_ANY_POINT 3 //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>У<EFBFBD><D0A3>
|
|
|
|
|
|
|
|
|
|
|
|
#define POINT_INPUT 0 //<2F>ֹ<EFBFBD><D6B9><EFBFBD><EFBFBD><EFBFBD>ʽ
|
|
|
|
|
|
#define POINT_SELECT 1 //ʰȡ<CAB0><C8A1>ʽ
|
|
|
|
|
|
#define POINT_FILE 2 //<2F><><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD>ʽ
|
|
|
|
|
|
|
|
|
|
|
|
enum COORDINATE_MODE
|
|
|
|
|
|
{
|
|
|
|
|
|
COORDINATE_MODE_XY = 0,
|
|
|
|
|
|
COORDINATE_MODE_DMS = 1,
|
|
|
|
|
|
COORDINATE_MODE_DEGREE = 2
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
class CItemCalibrate :
|
|
|
|
|
|
public CItemSelectPoint
|
|
|
|
|
|
{
|
|
|
|
|
|
public:
|
|
|
|
|
|
CItemCalibrate(CSigmaDoc * ppDoc);
|
|
|
|
|
|
virtual ~CItemCalibrate(void);
|
|
|
|
|
|
|
|
|
|
|
|
void OnDraw(CXyDC* pDC) override;
|
|
|
|
|
|
void OnLButtonDown(CDC *pDC, UINT nFlags, CPoint point, int vk) override;
|
|
|
|
|
|
virtual BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message) override;
|
|
|
|
|
|
virtual BOOL DoSelectEnd(void);
|
|
|
|
|
|
virtual BOOL Select(POSITION pos, CPoint2D point);
|
|
|
|
|
|
virtual void Redo(void);
|
|
|
|
|
|
virtual void Undo(void);
|
|
|
|
|
|
virtual int GetSubMenu();
|
|
|
|
|
|
bool CalibrateForFourPoint(std::vector<CPoint2D> & pts, COORDINATE_MODE mode);
|
|
|
|
|
|
bool CalibrateForTwoPoint(std::vector<CPoint2D> & pts, COORDINATE_MODE mode);
|
|
|
|
|
|
protected:
|
|
|
|
|
|
void ConvertToDMSAndFill(std::vector<CPoint2D> & pts, int num);
|
|
|
|
|
|
void ConvertToDegreeAndFill(std::vector<CPoint2D> & pts, int num);
|
|
|
|
|
|
void FillCoordinateInput(std::vector<CPoint2D> & pts, int num);
|
|
|
|
|
|
protected:
|
|
|
|
|
|
int m_idea; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ
|
|
|
|
|
|
int m_mode; //<2F><><EFBFBD>뷽ʽ<EBB7BD><CABD>ʰȡ<CAB0><C8A1>ʽ<EFBFBD><CABD><EFBFBD>ֹ<EFBFBD><D6B9><EFBFBD><EFBFBD><EFBFBD>ʽ<EFBFBD><CABD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD>ʽ<EFBFBD><CABD>
|
|
|
|
|
|
int m_nCoorIdea; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>뷽ʽ<EBB7BD><CABD>0<EFBFBD><30>XY<58><59>1<EFBFBD><31><EFBFBD>ȷ<EFBFBD><C8B7>롢2<EBA1A2><32><EFBFBD><EFBFBD>
|
|
|
|
|
|
|
|
|
|
|
|
UINT m_nBackupID;
|
|
|
|
|
|
|
|
|
|
|
|
CList<CPoint2D,CPoint2D> RedoPointList;
|
|
|
|
|
|
CList<CPoint2D,CPoint2D> PointList; //<2F><><EFBFBD><EFBFBD>ʵ<EFBFBD>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
BOOL CalibrateAny(void);
|
|
|
|
|
|
BOOL CalibrateOther(void);
|
|
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
void SetIdea(int nIdea);
|
|
|
|
|
|
void SetMode(int nMode);
|
|
|
|
|
|
int GetIdea(void);
|
|
|
|
|
|
int GetCoordinateMode(void);
|
|
|
|
|
|
int MetaToImage(BOOL bAddAction);
|
|
|
|
|
|
void SetBackupID(UINT nID);
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
};
|