figure.cpp

来自「教材例子」· C++ 代码 · 共 24 行

CPP
24
字号
//程序FIGURE.CPP(8.6.3)		功能:图形类FIGURE的类实现 
#include "figstack.h"
FIGURE::FIGURE(int x, int y)
{
	x_pos=x;
	y_pos=y;
	visible=FALSE;
}
void FIGURE::move_to(int x, int y)
{
	this->hide();
	this->x_pos=x;
	this->y_pos=y;
	this->show();
}
void FIGURE::contract(int delta)
{
	expand(-delta);
}
BOOLEAN FIGURE::is_visible()
{
	return visible;
}

⌨️ 快捷键说明

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