Скачиваний:
8
Добавлен:
01.05.2014
Размер:
1.52 Кб
Скачать
// Copyright (C) 1991 - 1999 Rational Software Corporation

#if defined (_MSC_VER) && (_MSC_VER >= 1000)
#pragma once
#endif
#ifndef _INC_PENTAGON_47091B200290_INCLUDED
#define _INC_PENTAGON_47091B200290_INCLUDED

#include "Figure.h"

//##ModelId=47091B200290
class Pentagon 
: virtual public Figure
{
public:
	int getSize() const;
	//##ModelId=470A27EF034B
	virtual void draw(CDC* pDC, COLORREF color, int pen);

	//##ModelId=470A152E01C5
	virtual ~Pentagon();

	//##ModelId=47092D650177
	Pentagon(CPoint center, int size,  COLORREF color);

	//##ModelId=472F355503A9
	double area();

	//##ModelId=472F355503D8
	void move(CSize& size);

	virtual CRect getBoundRect() const {
		return boundRect;
	}

	virtual COLORREF getColor() const {
		return color;
	}

	virtual int getPenWidth() const {
		return pen;
	}

	CPoint getCenterPoint() const {
		return centerPoint;
	}

	virtual void setColor(COLORREF color) {
		this->color = color;
	}

	virtual void writeIn(CArchive& ar) const
	{
		ar << (*this);
	}

	friend CArchive& operator<<(CArchive& ar, const Pentagon& rhs) {
		ar << CString("Pentagon") << rhs.centerPoint.x << rhs.centerPoint.y << rhs.size << rhs.color;
		return ar;
	};

private:
	CPoint centerPoint;
	int pen;
	//##ModelId=470A2862001F
	static long count_ID;

	//##ModelId=470A286702AF
	long ID;

	//##ModelId=47092C2D02BF
	int size;

	CRect boundRect;

	COLORREF color;

};

#endif /* _INC_PENTAGON_47091B200290_INCLUDED */
Соседние файлы в папке Лабораторная работа 23