X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=pixmaps%2Fconvert.c;h=31188083036bdd6277a38bfd6782f216a26a7c7c;hb=532a8a1561833a5ba0d571025c8c30c40502a976;hp=dcdcd4711ec4653b4732fcc6cebe4c8cb9ca14ab;hpb=86517e539f33650be656c482020a878fec0723c9;p=xboard.git diff --git a/pixmaps/convert.c b/pixmaps/convert.c index dcdcd47..3118808 100644 --- a/pixmaps/convert.c +++ b/pixmaps/convert.c @@ -54,6 +54,19 @@ void Paint(char dest[130][130], char src[130][130], int size, char c) for(i=0; i 0) FloodFill(a, size, x-1, y); + if(y > 0) FloodFill(a, size, x, y-1); + if(x < size-1) FloodFill(a, size, x+1, y); + if(y < size-1) FloodFill(a, size, x, y+1); + } + +} + void Save(FILE *f, char *name, char data[130][130], int size, char *col, int depth) { // write out data in source format for d x d pixmap with specified square color int i, j; @@ -79,9 +92,11 @@ char data[130][130], oData[130][130], sData[130][130], wData[130][130]; main(int argc, char **argv) { - int i, j, k, d, cnt, p, s, t; char c, h, w, *name, buf[80]; + int i, j, k, d, cnt, p, s, t; char c, h, w, *name, buf[80], transparent; FILE *f; + transparent = argc > 1 && !strcmp(argv[1], "-t"); + for(s=0; s<18; s++) for(p=0; pieceList[p] != NULL; p++) { // Load the 3 kinds of Windows monochrome bitmaps (outline, solid, white fill) @@ -107,19 +122,26 @@ main(int argc, char **argv) printf("%s loaded\n", buf); // construct pixmaps as character arrays d = sizeList[s]; - for(i=0; i