#include <graphics.h>
#include <stdlib.h>
#include <conio.h>
#include <stdio.h>
#include <dos.h>
#include <bios.h>
#include <math.h>
#include <alloc.h>
/*定义常量*/
/*向上翻页移键*/
#define PAGEUP 0x4900
/*向下翻页移键*/
#define PAGEDOWN 0x5100
/*Escape键*/
#define ESC 0x011b
/*左移键*/
#define LEFT 0x4b00
/*右移键*/
#define RIGHT 0x4d00
/*下移键*/
#define DOWN 0x5000
/*上移键*/
#define UP 0x4800
/*空格键*/
#define SPACE 0x3920
#define NO_PRESSED 0
#define LEFT_PRESSED 1
#define RIGHT_PRESSED 2
#define pi 3.1415926
/*定义全局变量*/
int Rx,Ry,R;
int TOPx,TOPy,BOTTOMx,BOTTOMy;
int Centx,Centy;
int lineStartx,lineStarty,lineEndx,lineEndy;
int linePoint_x[20],linePoint_y[20];
/*这里的字模数组均由“点阵字模工具”生成,你可以用你自己需要的点阵信息来
替换示例中的字模信息,注意字模大小要一致,否则显示会出问题。*/
char zhi16K[]={
/* 以下是 '直' 的 16点阵楷体_GB2312 字模,32 byte */
0x01,0x00,0x01,0x00,0x01,0xF0,0x1E,0x00,
0x02,0x00,0x07,0xC0,0x08,0x40,0x0F,0x40,
0x08,0x40,0x0F,0x40,0x08,0x40,0x0F,0x40,
0x08,0x40,0x0F,0xFC,0x70,0x00,0x00,0x00,
};
char xian16K[]={
/* 以下是 '线' 的 16点阵楷体_GB2312 字模,32 byte */
0x00,0x80,0x00,0x90,0x08,0x88,0x10,0x80,
0x24,0xF0,0x45,0x80,0x78,0xB0,0x11,0xC0,
0x2C,0x88,0x70,0x50,0x04,0x60,0x18,0xA4,
0x63,0x14,0x00,0x0C,0x00,0x04,0x00,0x00,
};
char ju16K[]={
/* 以下是 '矩' 的 16点阵楷体_GB2312 字模,32 byte */