画图软件C程序代码

合集下载
相关主题
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

#include

#include

#include

#include

#include

#include

#include

#include

/*定义常量*/

/*向上翻页移键*/

#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 */ 0x00,0x00,0x08,0x00,0x08,0x78,0x10,0x80,

0x1E,0x80,0x28,0xF8,0x48,0x88,0x0E,0x88,

0xF8,0xF0,0x08,0x80,0x14,0x80,0x12,0x9E,

0x20,0xE0,0x40,0x00,0x00,0x00,0x00,0x00,

};

char xing16K[]={

/* 以下是 '形' 的 16点阵楷体_GB2312 字模,32 byte */ 0x00,0x00,0x07,0x88,0x3A,0x08,0x12,0x10,

0x12,0x20,0x17,0x48,0xFA,0x10,0x12,0x20,

0x12,0xC8,0x12,0x08,0x22,0x10,0x42,0x20,

0x00,0x40,0x00,0x80,0x03,0x00,0x00,0x00,

};

char yuan16K[]={

/* 以下是 '圆' 的 16点阵楷体_GB2312 字模,32 byte */ 0x00,0xF8,0x3F,0x08,0x23,0x88,0x24,0x88,

0x27,0x08,0x21,0xC8,0x2E,0x48,0x29,0x48,

0x29,0x48,0x22,0x88,0x24,0x48,0x28,0x08,

0x3F,0xE8,0x00,0x10,0x00,0x00,0x00,0x00,

};

char qing16K[]={

/* 以下是 '清' 的 16点阵楷体_GB2312 字模,32 byte */ 0x00,0x80,0x00,0xE0,0x33,0x80,0x10,0xE0,

0x03,0x80,0x40,0xFC,0x2F,0x00,0x01,0xE0,

0x12,0x20,0x13,0xA0,0x22,0x20,0x63,0xA0,

0x42,0x20,0x02,0x60,0x00,0x20,0x00,0x00,

};

char ping16K[]={

/* 以下是 '屏' 的 16点阵楷体_GB2312 字模,32 byte */ 0x00,0xF0,0x0F,0x30,0x08,0x60,0x0F,0x80,

0x0A,0x20,0x09,0x40,0x08,0xF8,0x17,0x20,

0x11,0x3E,0x2F,0xE0,0x21,0x20,0x42,0x20,

0x82,0x20,0x04,0x20,0x08,0x20,0x00,0x00,

};

char bao16K[]={

/* 以下是 '保' 的 16点阵楷体_GB2312 字模,32 byte */ 0x00,0x00,0x09,0xF0,0x0A,0x10,0x12,0x10,

0x13,0xE0,0x30,0x80,0x50,0xFC,0x9F,0x80,

0x11,0xC0,0x12,0xA0,0x14,0x98,0x18,0x8E,

0x10,0x80,0x10,0x80,0x00,0x00,0x00,0x00,

};

char cun16K[]={

/* 以下是 '存' 的 16点阵楷体_GB2312 字模,32 byte */ 0x01,0x00,0x01,0x00,0x01,0xF0,0x1E,0x00,

0x02,0x70,0x05,0x90,0x08,0x20,0x08,0x40,

0x18,0x7E,0x2B,0xA0,0xC8,0x20,0x08,0x20,

0x08,0x20,0x08,0xA0,0x00,0x40,0x00,0x00,

};

char jia16K[]={

/* 以下是 '加' 的 16点阵楷体_GB2312 字模,32 byte */ 0x00,0x00,0x08,0x00,0x08,0x00,0x08,0x00,

0x0F,0x00,0x79,0x3C,0x09,0x44,0x11,0x44,

0x11,0x44,0x22,0x44,0x22,0x78,0x4A,0x00,

0x84,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

};

char zai16K[]={

/* 以下是 '载' 的 16点阵楷体_GB2312 字模,32 byte */ 0x00,0x80,0x08,0xA0,0x08,0x90,0x0E,0x80,

0x38,0xF0,0x0F,0x80,0x78,0x50,0x0E,0x50,

0x34,0x20,0x1E,0x20,0x34,0x50,0x0E,0x92,

0x75,0x0A,0x04,0x06,0x04,0x02,0x00,0x00,

};

char bang16K[]={

/* 以下是 '帮' 的 16点阵楷体_GB2312 字模,32 byte */

相关文档
最新文档