#include<graphics.h>
#include<conio.h>
#include<math.h>
#define WIDTH 600
#define HEIGHT 600
#define PI 3.14159
#define BLANK 30
class initGraph {
public:
initGraph(int w, int h)
{
initgraph(w, h);
BeginBatchDraw();
}
~initGraph()
{
EndBatchDraw();
closegraph();
}
};
int centX, centY;//表的圆心
int clockRadius;
double secondLength;
int secondEndX, secondEndY;
double secondAngle;
double minuteLength;
int minuteEndX, minuteEndY;
double minuteAngle;
double hourLength;
int hourEndX, hourEndY;
double hourAngle;
int centX1, centY1;
int clockRadius1;
double secondLength1;
int secondEndX1, secondEndY1;
double secondAngle1;
double minuteLength1;
int minuteEndX1, minuteEndY1;
double minuteAngle1;
double hourLength1;
int hourEndX1, hourEndY1;
double hourAngle1;
void startup()
{
centX = WIDTH / 2;
centY = HEIGHT / 2;
clockRadius = WIDTH / 2 - BLANK;
secondLength = clockRadius * 4 / 5;
minuteLength = secondLength
C++ easyx时钟(不同时区)
最新推荐文章于 2024-02-19 18:32:44 发布