Добавил:
Studfiles2
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз:
Предмет:
Файл:Лабораторная работа 23 / TextInPentagon
.h// Copyright (C) 1991 - 1999 Rational Software Corporation
#if defined (_MSC_VER) && (_MSC_VER >= 1000)
#pragma once
#endif
#ifndef _INC_TEXTINPENTAGON_47091CF601A5_INCLUDED
#define _INC_TEXTINPENTAGON_47091CF601A5_INCLUDED
#include "Text.h"
#include "Pentagon.h"
//##ModelId=47091CF601A5
class TextInPentagon
: virtual public Text
, virtual public Pentagon
{
private:
int pen;
//##ModelId=470A2B400222
static long count_ID;
//##ModelId=470A2B460128
long ID;
COLORREF color;
public:
//##ModelId=470A2EDA034B
virtual void draw(CDC* pDC, COLORREF color, int pen);
//##ModelId=470A154F0290
virtual ~TextInPentagon();
//##ModelId=47092F1A01B5
TextInPentagon(CPoint center, int size, const char* text, COLORREF aColor);
//##ModelId=472F6259033C
double area();
//##ModelId=472F6259035B
void move(CSize& size);
virtual CRect getBoundRect() const {
return Pentagon::getBoundRect();
}
virtual COLORREF getColor() const {
return color;
}
virtual int getPenWidth() const {
return pen;
}
virtual CPoint getCenterPoint() const {
return Pentagon::getCenterPoint();
}
virtual void setColor(COLORREF color) {
this->color = color;
}
virtual void writeIn(CArchive& ar) const
{
ar << (*this);
}
friend CArchive& operator<<(CArchive& ar, const TextInPentagon& rhs) {
ar << CString("TextInPentagon") <<
(rhs.getCenterPoint()).x <<
(rhs.getCenterPoint()).y <<
rhs.getSize() << CString(rhs.getText()) <<
rhs.getColor();
return ar;
};
};
#endif /* _INC_TEXTINPENTAGON_47091CF601A5_INCLUDED */
Соседние файлы в папке Лабораторная работа 23