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:
|