• 大小: 317KB
    文件类型: .zip
    金币: 2
    下载: 1 次
    发布日期: 2021-01-04
  • 语言: C/C++
  • 标签: C语言  画板  EGE  

资源简介

用C下的EGE库写的画板,有初始界面和菜单,可以画三角形,长方形什么的。

资源截图

代码片段和文件信息

#include “circ.h“
#include “shape.h “

void circ(){
char a[50];
int i = 0 b[20] nos k = 0;
char *p ;
inputbox_getline(“Circle“ “Please input the coordinaries of the circle center and the radius of the circle.\nPlease use  to separate them.“ a 50);
//--------------存入文件分割线----------------
SHAPE shape[200];  
FILE * fp = NULL;  
fp = fopen(“save.txt““r“);        //读取文件
fscanf(fp“%d\n“ &nos);
if (nos < 0) nos = 0;
for(k=0; k < nos; k++) {
fscanf(fp“%d %10s %d %s %d %d\n“ &(shape[k].type) &(shape[k].name) &(shape[k].n) &(shape[k].coords) &(shape[k].fill) &(shape[k].color));  //保存原有数据
}
fclose(fp);
shape[nos].type = 2;                //存入结构体
shape[nos]._name = “circle“;
shape[nos].n = 0;
shape[nos]._coords = a; 
shape[nos].fill = 0;
sha

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  1980-01-01 00:00  Painter\
     文件         135  2014-01-02 15:11  Painter\Whatever\readme.txt
     目录           0  2014-01-02 15:03  Painter\Debug\
     文件         891  2013-11-07 09:55  Painter\Painter.sln
     文件       46592  2014-01-02 15:03  Painter\Painter.suo
     目录           0  2014-01-02 14:59  Painter\Whatever\
     文件        1696  2013-12-31 14:54  Painter\Whatever\circ.cpp
     文件          50  2013-12-05 11:29  Painter\Whatever\circ.h
     目录           0  2014-01-02 15:03  Painter\Whatever\Debug\
     文件        1962  2014-01-02 15:03  Painter\Whatever\Debug\Painter.Build.CppClean.log
     文件         397  2014-01-02 15:03  Painter\Whatever\Debug\Whatever.log
     文件       55163  2013-06-01 21:16  Painter\Whatever\ege.h
     文件        2026  2013-04-23 00:35  Painter\Whatever\graphics.h
     文件      809138  2013-10-26 15:17  Painter\Whatever\graphics10.lib
     文件         386  2013-12-24 14:23  Painter\Whatever\jack.cpp
     文件          75  2013-11-27 22:52  Painter\Whatever\jack.h
     文件         186  2013-12-24 14:23  Painter\Whatever\japan.cpp
     文件          80  2013-11-27 22:52  Painter\Whatever\japan.h
     文件        1651  2013-12-31 14:08  Painter\Whatever\line.cpp
     文件          50  2013-12-28 10:56  Painter\Whatever\line.h
     文件        2047  2014-01-02 14:53  Painter\Whatever\menu1.cpp
     文件          71  2013-11-27 22:53  Painter\Whatever\menu1.h
     文件        3401  2014-01-02 15:00  Painter\Whatever\menu2.cpp
     文件          75  2013-11-27 22:53  Painter\Whatever\menu2.h
     文件         774  2014-01-02 14:53  Painter\Whatever\opening.cpp
     文件          53  2013-12-24 13:59  Painter\Whatever\opening.h
     文件         367  2014-01-02 14:11  Painter\Whatever\Painter.cpp
     文件        1758  2014-01-02 13:54  Painter\Whatever\poly.cpp
     文件          50  2013-12-19 09:32  Painter\Whatever\poly.h
     文件        1141  2014-01-02 15:00  Painter\Whatever\query.cpp
     文件          51  2014-01-02 15:00  Painter\Whatever\query.h
............此处省略11个文件信息

评论

共有 条评论