实验四三次B样条曲线算法.pdf
文本预览下载声明
1
1. TestView.h 文件
// TestView.h : interface of the CTestView class
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_TESTVIEW_H__A75FDCFB_621C_4E38_A154_C344803E6372__INCLUD
ED_)
#define AFX_TESTVIEW_H__A75FDCFB_621C_4E38_A154_C344803E6372__INCLUDED_
#if _MSC_VER 1000
#pragma once
#endif // _MSC_VER 1000
class CTestView : public CView
{
protected: // create from serialization only
CTestView();
DECLARE_DYNCREATE(CTestView)
// Attributes
public:
CTestDoc* GetDocument();
// Operations
public:
void B3_curves(char pflag,long xq[][2],CDC*pDC);//绘制B 样条曲线
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CTestView)
public:
2
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 ~CTestView();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext dc) const;
#endif
protected:
BOOL m_AbleToLeftBtn;// 鼠标左键有效
BOOL m_AbleToMove;// 鼠标移动点有效
int m_i;//控制点坐标编号
CDC m_Pic;//双缓冲图片
long p[9][2];// 鼠标点
// Generated message map functions
protected:
//{{AFX_MSG(CTestView)
afx_msg void OnMenuB();
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
#ifndef _DEBUG // debug version in TestView.cpp
inline CTestDoc*
显示全部