Free Hero Mesh

Check-in [d941198b8b]
Login
This is a mirror of the main repository for Free Hero Mesh. New tickets and changes will not be accepted at this mirror.
Overview
Comment:Some corrections to the picture editor
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: d941198b8b207ada2cb414977c82b80a7ae990e3
User & Date: user on 2021-06-03 21:06:48
Other Links: manifest | tags
Context
2021-06-04
20:54
Correct the implementation of "else" in pattern blocks check-in: a800f290bf user: user tags: trunk
2021-06-03
21:06
Some corrections to the picture editor check-in: d941198b8b user: user tags: trunk
2021-06-02
04:35
Improvement to documentation and FAQ check-in: c0239a6664 user: user tags: trunk
Changes

Modified picedit.c from [4564fe9a7b] to [950f3bbcaa].

829
830
831
832
833
834
835
836

837
838
839
840
841
842
843
829
830
831
832
833
834
835

836
837
838
839
840
841
842
843







-
+







            case 5: // Fill rectangle
              if(i==1) {
                xx=x; yy=y;
              } else if(xx!=-1) {
                p=pict[sel]->data+(j=pict[sel]->size);
                if(xx<x) i=x,x=xx,xx=i;
                if(yy<y) i=y,y=yy,yy=i;
                while(y<yy) memset(p+y*j+x,cc,xx+1-x),y++;
                while(y<=yy) memset(p+y*j+x,cc,xx+1-x),y++;
                xx=yy=-1;
              }
              break;
            case 6: // Circle
              if(i==1) {
                xx=x; yy=y;
              } else if(i==2) {
1571
1572
1573
1574
1575
1576
1577
1578


1579
1580
1581
1582
1583
1584
1585
1571
1572
1573
1574
1575
1576
1577

1578
1579
1580
1581
1582
1583
1584
1585
1586







-
+
+







  int sc=0;
  int max=load_picture_file();
  int i,n;
  sqlite3_create_function(userdb,"VALID_NAME",1,SQLITE_UTF8|SQLITE_DETERMINISTIC,0,fn_valid_name,0,0);
  sqlite3_create_module(userdb,"GRAPH",&vt_graph,0);
  init_palette();
  optionquery[1]=Q_imageSize;
  *gsizes=picture_size=strtol(xrm_get_resource(resourcedb,optionquery,optionquery,2)?:"16",0,10);
  picture_size=strtol(xrm_get_resource(resourcedb,optionquery,optionquery,2)?:"16",0,10);
  if(!*gsizes) *gsizes=picture_size;
  set_cursor(XC_arrow);
  set_caption();
  i=sqlite3_prepare_v3(userdb,"SELECT `ID`,SUBSTR(`NAME`,1,LENGTH(`NAME`)-4),`TYPE` FROM `PICEDIT` WHERE `TYPE` ORDER BY `NAME` LIMIT ?1 OFFSET ?2;",-1,SQLITE_PREPARE_PERSISTENT,&st,0);
  if(i) fatal("SQL error (%d): %s\n",i,sqlite3_errmsg(userdb));
  ids=calloc(screen->h/8,sizeof(sqlite3_int64));
  if(!ids) fatal("Allocation failed\n");
  redraw: