📄 shape.cpp
字号:
// Shape.cpp: implementation of the Shape class.
//
//////////////////////////////////////////////////////////////////////
#include <assert.h>
#include "ezwin.h"
#include "WindowObject.h"
#include "Shape.h"
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
Shape::Shape(SimpleWindow &Window, const Position &p,
const color &c) : WindowObject(Window, p), Color(c),
Border(true) {
// No body needed
}
color Shape::GetColor() const {
return Color;
}
void Shape::SetColor(const color &c) {
assert(c >= 0 && c < MaxColors);
Color = c;
return;
}
void Shape::SetBorder() {
Border = true;
return;
}
void Shape::ClearBorder() {
Border = false;
return;
}
bool Shape::HasBorder() const {
return Border;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -