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

📄 polygon.h

📁 一个复杂的画图系统
💻 H
字号:
// Polygon.h: interface for the CPolygon class.////////////////////////////////////////////////////////////////////////#if !defined(AFX_POLYGON_H__671B28E5_F8E8_11D2_B2E0_444553540000__INCLUDED_)#define AFX_POLYGON_H__671B28E5_F8E8_11D2_B2E0_444553540000__INCLUDED_#if _MSC_VER >= 1000#pragma once#endif // _MSC_VER >= 1000#include "Shape.h"struct PTS
{
	double pcos,psin,r;
};class CPolygon : public CShape  {	//attributespublic:	CArray<CPoint,CPoint> m_tVtxArray;
	//CArray<double,double> m_RAry;
	CArray<PTS,PTS> m_ptAry;
	int Curpt;	CPoint basept;public:	void Draw(CDC* pDC);	void AddPoint(CPoint& pt)	{		m_tVtxArray.Add(pt);
		AddVert();	}	CPoint& GetTail()	{		ASSERT(m_tVtxArray.GetSize() > 0);		return m_tVtxArray[m_tVtxArray.GetSize() - 1];	}	CPoint& GetHead()	{		ASSERT(m_tVtxArray.GetSize() > 0);		return m_tVtxArray[0];	}	int GetVtxCount()	{		return m_tVtxArray.GetSize();	}	public:	void AddVert();
	void UpdateProp(int sel);
	void InitProp();
	void invalid(CGeditorView *pView);
	void ChangeBase(int x,int y);
	void Mirror(int syd, CDC *pDC,CPoint &basept,CGeditorView* pView);
	CShape * copys(TCHAR &ch);
	void CalForRot(CPoint &pt);
	void rotate(int rsel,CDC *pDC,CPoint pt, CGeditorView *pView);
	int PtInPoly(CPoint &pt);
	int InTest(CPoint pt);
	void dragobj(int leash,CDC *pDC,CPoint point,CGeditorView* pView);
	void Serialize(CArchive& ar);	CPolygon();	virtual ~CPolygon();#ifdef _DEBUG	virtual void AssertValid() const;	virtual void Dump(CDumpContext& dc) const;#endifprotected:	DECLARE_SERIAL(CPolygon)};#endif // !defined(AFX_POLYGON_H__671B28E5_F8E8_11D2_B2E0_444553540000__INCLUDED_)

⌨️ 快捷键说明

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