shape.h
来自「在PDA中的画图程序」· C头文件 代码 · 共 82 行
H
82 行
// 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 + =
减小字号Ctrl + -
显示快捷键?