d_draw.h
来自「这是数据结构和算法的国外经典书籍.清华大学出版社出版的<数据结构C++语言」· C头文件 代码 · 共 53 行
H
53 行
#ifndef GRAPHICS_OPERATIONS
#define GRAPHICS_OPERATIONS
#include "ezdraw.h"
void openWindow(); // initialize drawing surface
void viewWindow(); // wait until a key is pressed
void eraseWindow(); // erase the drawing window
void closeWindow(); // close the drawing surface
// wait secs seconds before executing next instruction
void delayWindow(double secs);
// return true if a key pressed; otherwise, return false
bool keyPress();
// ***********************************************************
// graphic functions implementation
// ***********************************************************
void openWindow()
{
ezdInitialize();
}
void viewWindow()
{
ezdWaitForKeyPress();
}
void eraseWindow()
{
ezdClearDrawSurface();
}
void closeWindow()
{
ezdCleanUp();
}
void delayWindow(double secs)
{
ezdWait((EZDUINT)(secs * 1000));
}
bool keyPress()
{
if (ezdKeyPress() != 0)
return true;
else
return false;
}
#endif // GRAPHICS_OPERATIONS
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?