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

📄 shape.h

📁 在PDA中的画图程序
💻 H
字号:
// Shape.h: interface for the CShape class.
//

#include "GeoPoint.h"
//#include "DrawInPDAView.h"
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_SHAPE_H__8CEE9534_67BB_4D57_B641_098D348887E4__INCLUDED_)
#define AFX_SHAPE_H__8CEE9534_67BB_4D57_B641_098D348887E4__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include <Afxtempl.h>


class CShape : public CObject  
{
public:
	CShape();
	virtual ~CShape();
	virtual bool Intersects(const CRect &rect);
	CRect m_extent;
	virtual void  Draw(CDC *pDC);
};

typedef CTypedPtrList<CObList, CShape*> CShapeList;

////////////////
class CDrawInPDAView;
class CShapePoly : public CShape
{
public:
	CShapePoly();
	virtual ~CShapePoly();
	void AddPoint(const CGeoPoint& Point, CDrawInPDAView* pView = NULL);
	virtual void Draw(CDC* pDC);
public:
	long m_nPoints;
	long m_nAllocPoints;
	CGeoPoint* m_sPoints;
};

////////
class CShapePoint : public CShape  
{
public:
	virtual void Draw(CDC *pDC);
	CGeoPoint m_gPoint;
	CShapePoint();
	virtual ~CShapePoint();

};

////////////
class CShapeLine : public CShape  
{
public:
	CShapePoint m_sPoint[2];
	virtual void  Draw(CDC* pDC);
	CShapeLine();
	virtual ~CShapeLine();

};

/////////////
class CShapeRectangle : public CShape  
{
public:
	CShapePoint* m_sPoints;
	virtual void Draw(CDC* pDC);
	CShapeRectangle();
	virtual ~CShapeRectangle();

};




#endif // !defined(AFX_SHAPE_H__8CEE9534_67BB_4D57_B641_098D348887E4__INCLUDED_)

⌨️ 快捷键说明

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