⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 circle.cpp

📁 教材例子
💻 CPP
字号:
//程序CIRCLE.CPP(8.6.6)		功能:圆类CIRCLE的类实现
#include "figstack.h"
CIRCLE::CIRCLE(int x, int y, int r):FIGURE(x, y)
{
	radius=r;
}
void CIRCLE::show()
{
	if(!is_visible()){
		visible=TRUE;
		circle(x_pos, y_pos, radius);
	}
}
void CIRCLE::hide()
{
	int temp_color;
	if(is_visible()){
		temp_color=getcolor();
		setcolor(getbkcolor());
		visible=FALSE;
		circle(x_pos, y_pos, radius);
		setcolor(temp_color);
	}
}
void CIRCLE::expand(int delta)
{
	this->hide();
	if(delta>0) radius*=delta;
	else if(delta<0) radius/=-delta;
	this->show();
}

⌨️ 快捷键说明

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