kochView.h
上传用户:wangyiwen
上传日期:2021-03-13
资源大小:287k
文件大小:2k
- // kochView.h : interface of the CKochView class
- //
- /////////////////////////////////////////////////////////////////////////////
- #if !defined(AFX_KOCHVIEW_H__FCA17219_6A06_48C5_9910_E9AAAA4A7D7E__INCLUDED_)
- #define AFX_KOCHVIEW_H__FCA17219_6A06_48C5_9910_E9AAAA4A7D7E__INCLUDED_
- #if _MSC_VER > 1000
- #pragma once
- #endif // _MSC_VER > 1000
- class CPOINT
- {
- public:
- double x,y;
- CPOINT()
- {
- }
- ~CPOINT()
- {
- }
- };
- class CKochView : public CView
- {
- protected: // create from serialization only
- CKochView();
- DECLARE_DYNCREATE(CKochView)
- // Attributes
- public:
- CKochDoc* GetDocument();
- // Operations
- public:
- // Overrides
- // ClassWizard generated virtual function overrides
- //{{AFX_VIRTUAL(CKochView)
- 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:
- void ClearScreen();
- void koch(CPOINT p0, CPOINT p1, int iter);
- virtual ~CKochView();
- #ifdef _DEBUG
- virtual void AssertValid() const;
- virtual void Dump(CDumpContext& dc) const;
- #endif
- protected:
- // Generated message map functions
- protected:
- //{{AFX_MSG(CKochView)
- afx_msg void OnKochCurve();
- afx_msg void OnKochSnow();
- //}}AFX_MSG
- DECLARE_MESSAGE_MAP()
- };
- #ifndef _DEBUG // debug version in kochView.cpp
- inline CKochDoc* CKochView::GetDocument()
- { return (CKochDoc*)m_pDocument; }
- #endif
- /////////////////////////////////////////////////////////////////////////////
- //{{AFX_INSERT_LOCATION}}
- // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
- #endif // !defined(AFX_KOCHVIEW_H__FCA17219_6A06_48C5_9910_E9AAAA4A7D7E__INCLUDED_)