📄 cgdemoview.h
字号:
// cgDemoView.h : interface of the CCgDemoView class
//
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_CGDEMOVIEW_H__A95B8ECE_A901_4F02_947A_A375BF3F1680__INCLUDED_)
#define AFX_CGDEMOVIEW_H__A95B8ECE_A901_4F02_947A_A375BF3F1680__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#define N 16
class CTransMatrix;
class CCgDemoView : public CView
{
protected: // create from serialization only
CCgDemoView();
DECLARE_DYNCREATE(CCgDemoView)
// Attributes
public:
CCgDemoDoc* GetDocument();
// Operations
public:
tagPOINT lsPoint,curPoint;
int m_wndWidth,m_wndHeight;
CClientDC *p_viewClientDC;
int m_inputX[N],m_inputY[N],m_inputNumbers;
float m_yMax[N],m_yMin[N],m_Xa[N],m_Dx[N];
int m_pEdges,m_iBegin,m_iEnd,m_scanLine;
void pFillScanLine();
void pXsort(int i, int m_iBegin);
void pUpdateXvalue();
void pInclude();
void pInsertLine(float x1, float y1, float x2, float y2);
void pLoadPolygon(int n, int *X, int *Y);
void FillPolygon(int n, int *X, int *Y);
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CCgDemoView)
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 ~CCgDemoView();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
CTransMatrix *m_transMatrixp;
// Generated message map functions
protected:
//{{AFX_MSG(CCgDemoView)
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
afx_msg void OnXleft();
afx_msg void OnXright();
afx_msg void OnYup();
afx_msg void OnYdown();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
#ifndef _DEBUG // debug version in cgDemoView.cpp
inline CCgDemoDoc* CCgDemoView::GetDocument()
{ return (CCgDemoDoc*)m_pDocument; }
#endif
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_CGDEMOVIEW_H__A95B8ECE_A901_4F02_947A_A375BF3F1680__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -