⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 textoutview.h

📁 这是用来进行模式识别的参考程序
💻 H
字号:
// textoutView.h : interface of the CTextoutView class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_TEXTOUTVIEW_H__5AE03B33_BC39_11D5_ADF5_0000215A0000__INCLUDED_)
#define AFX_TEXTOUTVIEW_H__5AE03B33_BC39_11D5_ADF5_0000215A0000__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
class myPoint:public CPoint
{
public:
	int iBelong;//所属的区号
public:
	myPoint();
};

class line
{
public:
	CPoint point[2];
	CPoint point1[2];
public:
	double Getk();
	CPoint GetMid();
	BOOL IsFrame();
	double Getk1();
	CPoint GetMid1();
	BOOL IsFrame1();
};

class side:public line
{
public:
	BOOL LineSide;
	BOOL LineSide1;

};

class area
{
public:
	side myLine[50];
	int Cnt;
public:
	area();
	void DelLine(int iLine);
};
class area1
{
public:
	side myLine1[50];
	int Cnt1;
public:
	area1();
	void DelLine1(int iLine);
};


class CTextoutView : public CView
{
protected: // create from serialization only
	CTextoutView();
	DECLARE_DYNCREATE(CTextoutView)

// Attributes
public:
	CTextoutDoc* GetDocument();

	area MyArea[100];
	int AreaCnt;
	area1 MyArea1[100];
	int AreaCnt1;

    myPoint mpO[100];
	myPoint mpX[100];
	myPoint mpS[100];
	myPoint mpW[100];
	int oCnt;
	int xCnt;
	int sCnt;
	int wCnt;

	line midline;
	line minline;
	line ResultLine[100];
	int iCnt;
	//
    line midline1;
	line minline1;
	line ResultLine1[100];
	int iCnt1;
	//result lines' count
// Operations
public:
    long Distance(CPoint p1,CPoint p2);
    void FindMin(int iArea);
	void MidLine();
	void SplitArea(int iArea);
	int IsPure(int iArea);
	BOOL SameLine(line l1,line l2);
	void Result();
	BOOL SameArea(int i1,int i2);
	////
    void FindMin1(int iArea);
	void midlinee();
	void SplitArea1(int iArea);
	int IsPure1(int iArea);
	BOOL SameLine1(line l1,line l2);
	void Result1();
	BOOL SameArea1(int i1,int i2);

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CTextoutView)
	public:
	virtual void OnDraw(CDC* pDC);  // overridden to draw this view
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
	protected:
	virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
	virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
	//}}AFX_VIRTUAL

// Implementation
public:
	int flag;
	virtual ~CTextoutView();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:


// Generated message map functions
protected:
	//{{AFX_MSG(CTextoutView)
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnStart();
	afx_msg void OnRestart();
	afx_msg void OnUndosort();
	afx_msg void OnOne(CPoint point);
	afx_msg void OnTwo(CPoint point);
	afx_msg void OnThree(CPoint point);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

#ifndef _DEBUG  // debug version in textoutView.cpp
inline CTextoutDoc* CTextoutView::GetDocument()
   { return (CTextoutDoc*)m_pDocument; }
#endif

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_TEXTOUTVIEW_H__5AE03B33_BC39_11D5_ADF5_0000215A0000__INCLUDED_)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -