📄 point.cpp
字号:
//程序POINT.CPP(7.2.6) 功能:实现点类POINT的成员函数
#include "basgraph.h"
POINT::POINT(int x, int y):LOCATION(x, y)
{
visible=FALSE;
}
BOOLEAN POINT::is_visible()
{
return visible;
}
void POINT::show()
{
if(!is_visible()){
visible=TRUE;
putpixel(x_pos, y_pos, getcolor());
}
}
void POINT::hide()
{
if(is_visible()){
visible=FALSE;
putpixel(x_pos, y_pos, getbkcolor());
}
}
void POINT::move_to(int x, int y)
{
hide();
x_pos=x;
y_pos=y;
show();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -