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

📄 fiveview.h

📁 五点光滑法的MFC实现
💻 H
字号:
// FiveView.h : interface of the CFiveView class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_FIVEVIEW_H__0F1BECD3_A8B6_4D3B_8E65_076B2B0CC40D__INCLUDED_)
#define AFX_FIVEVIEW_H__0F1BECD3_A8B6_4D3B_8E65_076B2B0CC40D__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include <list>
//using namespace std;

//四个参数
typedef struct canshu
{  
	double a0;
	double a1;
	double a2;
	double a3;
} CS;

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

// Attributes
public:
	CFiveDoc* GetDocument();
	
	std::list<CPoint> points;
	std::list<double> k; //存相邻点连线的斜率
	std::list<double> t; //存各点的斜率
	std::list<CS> cs;
	int Lian;            //判断

// Operations
public:

	void guanghua(std::list<CPoint>& points,std::list<CS>& cs);
	void figure_k_t(std::list<CPoint>& points,std::list<double>& k,std::list<double>& t);
	void drawpartofthecurve(CS cs,CDC* pDC,CPoint pt1,CPoint pt2);

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CFiveView)
	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);
	virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
	//}}AFX_VIRTUAL

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

protected:

// Generated message map functions
protected:
	//{{AFX_MSG(CFiveView)
	afx_msg void OnButtonLian();
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnCancelMode();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

#ifndef _DEBUG  // debug version in FiveView.cpp
inline CFiveDoc* CFiveView::GetDocument()
   { return (CFiveDoc*)m_pDocument; }
#endif

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

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

#endif // !defined(AFX_FIVEVIEW_H__0F1BECD3_A8B6_4D3B_8E65_076B2B0CC40D__INCLUDED_)

⌨️ 快捷键说明

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