applied gimp-kevint-000413-0 and gimp-mattias-000414-0

--Sven
This commit is contained in:
Sven Neumann 2000-04-14 08:59:52 +00:00
parent 9a78ace59e
commit 28757ba176
6 changed files with 149 additions and 110 deletions

View file

@ -1,3 +1,14 @@
2000-04-14 Sven Neumann <sven@gimp.org>
* plug-ins/maze/algorithms.c
* plug-ins/maze/handy.c: applied gimp-kevint-000413-0 which
promises to really close #8568 this time
* plug-ins/common/xpm.c: applied gimp-mattias-000414-0, which
makes XPM saving work in noninteractive mode. It also changes
the PDB call, but since it has never worked before, that should
be ok.
2000-04-13 Matt Wilson <msw@redhat.com> 2000-04-13 Matt Wilson <msw@redhat.com>
* gimp.spec: updated for 1.1.19, reworked filespec generation * gimp.spec: updated for 1.1.19, reworked filespec generation

View file

@ -16,9 +16,15 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/ */
/* XPM plugin version 1.2.2 */ /* XPM plugin version 1.2.3 */
/* 1.2.2 fixes bug that generated bad digits on images with more than 20000 colors. (thanks, yanele) /*
1.2.3 fixes bug when running in noninteractive mode
changes alpha_threshold range from [0, 1] to [0,255] for consistency with
the threshold_alpha plugin
1.2.2 fixes bug that generated bad digits on images with more than 20000
colors. (thanks, yanele)
parses gtkrc (thanks, yosh) parses gtkrc (thanks, yosh)
doesn't load parameter screen on images that don't have alpha doesn't load parameter screen on images that don't have alpha
@ -53,12 +59,12 @@ ABCDEFGHIJKLMNOPQRSTUVWXYZ`";
/* Structs for the save dialog */ /* Structs for the save dialog */
typedef struct typedef struct
{ {
gdouble threshold; gint threshold;
} XpmSaveVals; } XpmSaveVals;
typedef struct typedef struct
{ {
gint run; gint run;
} XpmSaveInterface; } XpmSaveInterface;
@ -72,7 +78,7 @@ typedef struct
/* whether the image is color or not. global so I only have to pass /* whether the image is color or not. global so I only have to pass
* one user value to the GHFunc * one user value to the GHFunc
*/ */
gint color; gboolean color;
/* bytes per pixel. global so I only have to pass one user value /* bytes per pixel. global so I only have to pass one user value
* to the GHFunc * to the GHFunc
@ -80,27 +86,27 @@ gint color;
gint cpp; gint cpp;
/* Declare local functions */ /* Declare local functions */
static void query (void); static void query (void);
static void run (gchar *name, static void run (gchar *name,
gint nparams, gint nparams,
GParam *param, GParam *param,
gint *nreturn_vals, gint *nreturn_vals,
GParam **return_vals); GParam **return_vals);
static gint32 load_image (gchar *filename); static gint32 load_image (gchar *filename);
static void parse_colors (XpmImage *xpm_image, static void parse_colors (XpmImage *xpm_image,
guchar **cmap); guchar **cmap);
static void parse_image (gint32 image_ID, static void parse_image (gint32 image_ID,
XpmImage *xpm_image, XpmImage *xpm_image,
guchar *cmap); guchar *cmap);
static gint save_image (gchar *filename, static gboolean save_image (gchar *filename,
gint32 image_ID, gint32 image_ID,
gint32 drawable_ID); gint32 drawable_ID);
static void init_gtk (void); static void init_gtk (void);
static gint save_dialog (void); static gint save_dialog (void);
static void save_ok_callback (GtkWidget *widget, static void save_ok_callback (GtkWidget *widget,
gpointer data); gpointer data);
GPlugInInfo PLUG_IN_INFO = GPlugInInfo PLUG_IN_INFO =
@ -113,7 +119,7 @@ GPlugInInfo PLUG_IN_INFO =
static XpmSaveVals xpmvals = static XpmSaveVals xpmvals =
{ {
0.50 /* alpha threshold */ 127 /* alpha threshold */
}; };
static XpmSaveInterface xpmint = static XpmSaveInterface xpmint =
@ -148,6 +154,7 @@ query (void)
{ PARAM_DRAWABLE, "drawable", "Drawable to save" }, { PARAM_DRAWABLE, "drawable", "Drawable to save" },
{ PARAM_STRING, "filename", "The name of the file to save the image in" }, { PARAM_STRING, "filename", "The name of the file to save the image in" },
{ PARAM_STRING, "raw_filename", "The name of the file to save the image in" }, { PARAM_STRING, "raw_filename", "The name of the file to save the image in" },
{ PARAM_INT32, "threshold", "Alpha threshold (0-255)" }
}; };
static gint nsave_args = sizeof (save_args) / sizeof (save_args[0]); static gint nsave_args = sizeof (save_args) / sizeof (save_args[0]);
@ -267,16 +274,16 @@ run (gchar *name,
case RUN_NONINTERACTIVE: case RUN_NONINTERACTIVE:
/* Make sure all the arguments are there! */ /* Make sure all the arguments are there! */
if (nparams != 4) if (nparams != 6)
{ {
status = STATUS_CALLING_ERROR; status = STATUS_CALLING_ERROR;
} }
else else
{ {
xpmvals.threshold = param[4].data.d_float; xpmvals.threshold = param[5].data.d_int32;
if (xpmvals.threshold < 0.0 || if (xpmvals.threshold < 0 ||
xpmvals.threshold > 1.0) xpmvals.threshold > 255)
status = STATUS_CALLING_ERROR; status = STATUS_CALLING_ERROR;
} }
break; break;
@ -360,7 +367,7 @@ parse_colors (XpmImage *xpm_image,
{ {
Display *display; Display *display;
Colormap colormap; Colormap colormap;
int i, j; gint i, j;
/* open the display and get the default color map */ /* open the display and get the default color map */
display = XOpenDisplay (NULL); display = XOpenDisplay (NULL);
@ -377,7 +384,7 @@ parse_colors (XpmImage *xpm_image,
/* parse each color in the file */ /* parse each color in the file */
for (i = 0, j = 0; i < xpm_image->ncolors; i++) for (i = 0, j = 0; i < xpm_image->ncolors; i++)
{ {
char *colorspec = "None"; gchar *colorspec = "None";
XpmColor *xpm_color; XpmColor *xpm_color;
XColor xcolor; XColor xcolor;
@ -395,7 +402,7 @@ parse_colors (XpmImage *xpm_image,
/* parse if it's not transparent. the assumption is that /* parse if it's not transparent. the assumption is that
g_new will memset the buffer to zeros */ g_new will memset the buffer to zeros */
if (strcmp(colorspec, "None") != 0) if (strcmp (colorspec, "None") != 0)
{ {
XParseColor (display, colormap, colorspec, &xcolor); XParseColor (display, colormap, colorspec, &xcolor);
(*cmap)[j++] = xcolor.red >> 8; (*cmap)[j++] = xcolor.red >> 8;
@ -418,16 +425,16 @@ parse_image (gint32 image_ID,
XpmImage *xpm_image, XpmImage *xpm_image,
guchar *cmap) guchar *cmap)
{ {
int tile_height; gint tile_height;
int scanlines; gint scanlines;
int val; gint val;
guchar *buf; guchar *buf;
guchar *dest; guchar *dest;
unsigned int *src; guint *src;
GPixelRgn pixel_rgn; GPixelRgn pixel_rgn;
GDrawable *drawable; GDrawable *drawable;
gint32 layer_ID; gint32 layer_ID;
int i,j; gint i, j;
layer_ID = gimp_layer_new (image_ID, layer_ID = gimp_layer_new (image_ID,
_("Color"), _("Color"),
@ -494,7 +501,7 @@ guint
compare (rgbkey *c1, compare (rgbkey *c1,
rgbkey *c2) rgbkey *c2)
{ {
return (c1->r == c2->r)&&(c1->g == c2->g)&&(c1->b == c2->b); return (c1->r == c2->r) && (c1->g == c2->g) && (c1->b == c2->b);
} }
void void
@ -506,22 +513,23 @@ set_XpmImage (XpmColor *array,
gint i, charnum, indtemp; gint i, charnum, indtemp;
indtemp=index; indtemp=index;
array[index].string = p = g_new(char, cpp+1); array[index].string = p = g_new (gchar, cpp+1);
/*convert the index number to base sizeof(linenoise)-1 */ /*convert the index number to base sizeof(linenoise)-1 */
for(i=0; i<cpp; ++i) for (i=0; i<cpp; ++i)
{ {
charnum = indtemp%(sizeof(linenoise)-1); charnum = indtemp % (sizeof (linenoise) - 1);
indtemp = indtemp / (sizeof (linenoise)-1); indtemp = indtemp / (sizeof (linenoise) - 1);
*p++=linenoise[charnum]; *p++ = linenoise[charnum];
} }
/* *p++=linenoise[indtemp]; */ /* *p++=linenoise[indtemp]; */
*p='\0'; /* C and its stupid null-terminated strings...*/ *p = '\0'; /* C and its stupid null-terminated strings... */
array[index].symbolic = NULL; array[index].symbolic = NULL;
array[index].m_color = NULL; array[index].m_color = NULL;
array[index].g4_color = NULL; array[index].g4_color = NULL;
if (color) if (color)
{ {
array[index].g_color = NULL; array[index].g_color = NULL;
@ -544,7 +552,7 @@ create_colormap_from_hash (gpointer gkey,
set_XpmImage (user_data, *((int *) value), string); set_XpmImage (user_data, *((int *) value), string);
} }
static gint static gboolean
save_image (gchar *filename, save_image (gchar *filename,
gint32 image_ID, gint32 image_ID,
gint32 drawable_ID) gint32 drawable_ID)
@ -553,10 +561,10 @@ save_image (gchar *filename,
gint width; gint width;
gint height; gint height;
gint alpha;
gint ncolors = 1; gint ncolors = 1;
gint *indexno; gint *indexno;
gint indexed; gboolean indexed;
gboolean alpha;
XpmColor *colormap; XpmColor *colormap;
XpmImage *image; XpmImage *image;
@ -570,9 +578,9 @@ save_image (gchar *filename,
GHashTable *hash = NULL; GHashTable *hash = NULL;
gint i, j, k; gint i, j, k;
gint threshold = 255 * xpmvals.threshold; gint threshold = xpmvals.threshold;
gint rc = FALSE; gboolean rc = FALSE;
/* get some basic stats about the image */ /* get some basic stats about the image */
switch (gimp_drawable_type (drawable_ID)) switch (gimp_drawable_type (drawable_ID))
@ -580,12 +588,12 @@ save_image (gchar *filename,
case RGBA_IMAGE: case RGBA_IMAGE:
case INDEXEDA_IMAGE: case INDEXEDA_IMAGE:
case GRAYA_IMAGE: case GRAYA_IMAGE:
alpha = 1; alpha = TRUE;
break; break;
case RGB_IMAGE: case RGB_IMAGE:
case INDEXED_IMAGE: case INDEXED_IMAGE:
case GRAY_IMAGE: case GRAY_IMAGE:
alpha = 0; alpha = FALSE;
break; break;
default: default:
return FALSE; return FALSE;
@ -595,13 +603,13 @@ save_image (gchar *filename,
{ {
case GRAYA_IMAGE: case GRAYA_IMAGE:
case GRAY_IMAGE: case GRAY_IMAGE:
color = 0; color = FALSE;
break; break;
case RGBA_IMAGE: case RGBA_IMAGE:
case RGB_IMAGE: case RGB_IMAGE:
case INDEXED_IMAGE: case INDEXED_IMAGE:
case INDEXEDA_IMAGE: case INDEXEDA_IMAGE:
color = 1; color = TRUE;
break; break;
default: default:
return FALSE; return FALSE;
@ -613,11 +621,11 @@ save_image (gchar *filename,
case GRAY_IMAGE: case GRAY_IMAGE:
case RGBA_IMAGE: case RGBA_IMAGE:
case RGB_IMAGE: case RGB_IMAGE:
indexed = 0; indexed = FALSE;
break; break;
case INDEXED_IMAGE: case INDEXED_IMAGE:
case INDEXEDA_IMAGE: case INDEXEDA_IMAGE:
indexed = 1; indexed = TRUE;
break; break;
default: default:
return FALSE; return FALSE;
@ -635,7 +643,8 @@ save_image (gchar *filename,
/*if ((mbuff = g_new(guint, width*height)) == NULL) /*if ((mbuff = g_new(guint, width*height)) == NULL)
goto cleanup;*/ goto cleanup;*/
if ((hash = g_hash_table_new((GHashFunc)rgbhash, (GCompareFunc) compare)) == NULL) if ((hash = g_hash_table_new ((GHashFunc)rgbhash,
(GCompareFunc) compare)) == NULL)
goto cleanup; goto cleanup;
/* put up a progress bar */ /* put up a progress bar */
@ -649,7 +658,8 @@ save_image (gchar *filename,
/* allocate a pixel region to work with */ /* allocate a pixel region to work with */
if ((buffer = g_new(guchar, gimp_tile_height()*width*drawable->bpp)) == NULL) if ((buffer = g_new (guchar,
gimp_tile_height()*width*drawable->bpp)) == NULL)
return 0; return 0;
gimp_pixel_rgn_init (&pixel_rgn, drawable, gimp_pixel_rgn_init (&pixel_rgn, drawable,
@ -660,11 +670,11 @@ save_image (gchar *filename,
/* process each row of tiles */ /* process each row of tiles */
for (i = 0; i < height; i+=gimp_tile_height()) for (i = 0; i < height; i+=gimp_tile_height())
{ {
int scanlines; gint scanlines;
/* read the next row of tiles */ /* read the next row of tiles */
scanlines = MIN(gimp_tile_height(), height - i); scanlines = MIN (gimp_tile_height(), height - i);
gimp_pixel_rgn_get_rect(&pixel_rgn, buffer, 0, i, width, scanlines); gimp_pixel_rgn_get_rect (&pixel_rgn, buffer, 0, i, width, scanlines);
data = buffer; data = buffer;
/* process each pixel row */ /* process each pixel row */
@ -677,7 +687,7 @@ save_image (gchar *filename,
/* do each pixel in the row */ /* do each pixel in the row */
for (k=0; k<width; k++) for (k=0; k<width; k++)
{ {
rgbkey *key = g_new(rgbkey, 1); rgbkey *key = g_new (rgbkey, 1);
guchar a; guchar a;
/* get pixel data */ /* get pixel data */
@ -698,13 +708,13 @@ save_image (gchar *filename,
} }
else else
{ {
indexno = g_hash_table_lookup(hash, key); indexno = g_hash_table_lookup (hash, key);
if (!indexno) if (!indexno)
{ {
indexno = g_new(int, 1); indexno = g_new (gint, 1);
*indexno = ncolors++; *indexno = ncolors++;
g_hash_table_insert(hash, key, indexno); g_hash_table_insert (hash, key, indexno);
key = g_new(rgbkey, 1); key = g_new (rgbkey, 1);
} }
*(idata++) = *indexno; *(idata++) = *indexno;
} }
@ -712,7 +722,7 @@ save_image (gchar *filename,
} }
/* kick the progress bar */ /* kick the progress bar */
gimp_progress_update ((double) (i+j) / (double) height); gimp_progress_update ((gdouble) (i+j) / (gdouble) height);
} }
} }
g_free (buffer); g_free (buffer);
@ -722,26 +732,28 @@ save_image (gchar *filename,
guchar *cmap; guchar *cmap;
cmap = gimp_image_get_cmap(image_ID, &ncolors); cmap = gimp_image_get_cmap(image_ID, &ncolors);
ncolors++; /* for transparency */ ncolors++; /* for transparency */
colormap = g_new(XpmColor, ncolors); colormap = g_new (XpmColor, ncolors);
cpp=(double)1.0+(double)log(ncolors)/(double)log(sizeof(linenoise)-1.0); cpp = (gdouble) 1.0 +
set_XpmImage(colormap, 0, "None"); (gdouble) log (ncolors) / (double) log (sizeof (linenoise)-1.0);
set_XpmImage (colormap, 0, "None");
for (i=0; i<ncolors-1; i++) for (i=0; i<ncolors-1; i++)
{ {
char *string; gchar *string;
guchar r, g, b; guchar r, g, b;
r = *(cmap++); r = *(cmap++);
g = *(cmap++); g = *(cmap++);
b = *(cmap++); b = *(cmap++);
string = g_new(char, 8); string = g_new (gchar, 8);
sprintf(string, "#%02X%02X%02X", (int)r, (int)g, (int)b); sprintf (string, "#%02X%02X%02X", (int)r, (int)g, (int)b);
set_XpmImage(colormap, i+1, string); set_XpmImage (colormap, i+1, string);
} }
} }
else else
{ {
colormap = g_new(XpmColor, ncolors); colormap = g_new (XpmColor, ncolors);
cpp = (double)1.0 + (double)log (ncolors) / (double)log (sizeof (linenoise) - 1.0); cpp = (gdouble) 1.0 +
(gdouble) log (ncolors) / (gdouble) log (sizeof (linenoise) - 1.0);
set_XpmImage (colormap, 0, "None"); set_XpmImage (colormap, 0, "None");
g_hash_table_foreach (hash, create_colormap_from_hash, colormap); g_hash_table_foreach (hash, create_colormap_from_hash, colormap);
@ -757,16 +769,18 @@ save_image (gchar *filename,
image->data = ibuff; image->data = ibuff;
/* do the save */ /* do the save */
XpmWriteFileFromXpmImage(filename, image, NULL); XpmWriteFileFromXpmImage (filename, image, NULL);
rc = TRUE; rc = TRUE;
cleanup: cleanup:
/* clean up resources */ /* clean up resources */
gimp_drawable_detach (drawable); gimp_drawable_detach (drawable);
if (ibuff) g_free(ibuff); if (ibuff)
g_free (ibuff);
/*if (mbuff) g_free(mbuff);*/ /*if (mbuff) g_free(mbuff);*/
if (hash) g_hash_table_destroy(hash); if (hash)
g_hash_table_destroy (hash);
return rc; return rc;
} }
@ -824,11 +838,12 @@ save_dialog (void)
scale_data = gimp_scale_entry_new (GTK_TABLE (table), 0, 0, scale_data = gimp_scale_entry_new (GTK_TABLE (table), 0, 0,
_("Alpha Threshold:"), SCALE_WIDTH, 0, _("Alpha Threshold:"), SCALE_WIDTH, 0,
xpmvals.threshold, 0.0, 1.0, 0.01, 0.1, 2, xpmvals.threshold, 0, 255, 1, 8, 0,
TRUE, 0, 0, TRUE, 0, 0,
NULL, NULL); NULL, NULL);
gtk_signal_connect (GTK_OBJECT (scale_data), "value_changed", gtk_signal_connect (GTK_OBJECT (scale_data), "value_changed",
GTK_SIGNAL_FUNC (gimp_double_adjustment_update), GTK_SIGNAL_FUNC (gimp_int_adjustment_update),
&xpmvals.threshold); &xpmvals.threshold);
gtk_widget_show (dlg); gtk_widget_show (dlg);

View file

@ -59,7 +59,7 @@ void mazegen_tileable(gint pos,
gint x, gint x,
gint y, gint y,
gint rnd); gint rnd);
void prim(guint pos, void prim(gint pos,
gchar *maz, gchar *maz,
guint x, guint x,
guint y, guint y,
@ -273,7 +273,7 @@ print_glist(gpointer data, gpointer user_data)
does break, let me know, and I'll go cry in a corner for a while does break, let me know, and I'll go cry in a corner for a while
before I get up the strength to re-code it. */ before I get up the strength to re-code it. */
void void
prim(guint pos, gchar *maz, guint x, guint y, gint rnd) prim(gint pos, gchar *maz, guint x, guint y, gint rnd)
{ {
GSList *front_cells=NULL; GSList *front_cells=NULL;
guint current; guint current;
@ -303,19 +303,19 @@ prim(guint pos, gchar *maz, guint x, guint y, gint rnd)
if (up >= 0) { if (up >= 0) {
maz[up]=FRONTIER; maz[up]=FRONTIER;
front_cells=g_slist_append(front_cells,(gpointer)up); front_cells=g_slist_append(front_cells,GINT_TO_POINTER(up));
} }
if (down >= 0) { if (down >= 0) {
maz[up]=FRONTIER; maz[down]=FRONTIER;
front_cells=g_slist_append(front_cells,(gpointer)down); front_cells=g_slist_append(front_cells,GINT_TO_POINTER(down));
} }
if (left >= 0) { if (left >= 0) {
maz[up]=FRONTIER; maz[left]=FRONTIER;
front_cells=g_slist_append(front_cells,(gpointer)left); front_cells=g_slist_append(front_cells,GINT_TO_POINTER(left));
} }
if (right >= 0) { if (right >= 0) {
maz[up]=FRONTIER; maz[right]=FRONTIER;
front_cells=g_slist_append(front_cells,(gpointer)right); front_cells=g_slist_append(front_cells,GINT_TO_POINTER(right));
} }
/* While frontier is not empty do the following... */ /* While frontier is not empty do the following... */
@ -323,9 +323,9 @@ prim(guint pos, gchar *maz, guint x, guint y, gint rnd)
/* Remove one cell at random from frontier and place it in IN. */ /* Remove one cell at random from frontier and place it in IN. */
current = rand() % g_slist_length(front_cells); current = rand() % g_slist_length(front_cells);
pos = (guint)g_slist_nth(front_cells,current)->data; pos = GPOINTER_TO_INT(g_slist_nth(front_cells,current)->data);
front_cells=g_slist_remove(front_cells,(gpointer)pos); front_cells=g_slist_remove(front_cells,GINT_TO_POINTER(pos));
maz[pos]=IN; maz[pos]=IN;
/* If the cell has any neighbors in OUT, remove them from /* If the cell has any neighbors in OUT, remove them from
@ -341,7 +341,8 @@ prim(guint pos, gchar *maz, guint x, guint y, gint rnd)
switch (maz[up]) { switch (maz[up]) {
case OUT: case OUT:
maz[up]=FRONTIER; maz[up]=FRONTIER;
front_cells=g_slist_prepend(front_cells,(gpointer)up); front_cells=g_slist_prepend(front_cells,
GINT_TO_POINTER(up));
break; break;
case IN: case IN:
d=1; d=1;
@ -354,7 +355,8 @@ prim(guint pos, gchar *maz, guint x, guint y, gint rnd)
switch (maz[down]) { switch (maz[down]) {
case OUT: case OUT:
maz[down]=FRONTIER; maz[down]=FRONTIER;
front_cells=g_slist_prepend(front_cells,(gpointer)down); front_cells=g_slist_prepend(front_cells,
GINT_TO_POINTER(down));
break; break;
case IN: case IN:
d=d|2; d=d|2;
@ -367,7 +369,8 @@ prim(guint pos, gchar *maz, guint x, guint y, gint rnd)
switch (maz[left]) { switch (maz[left]) {
case OUT: case OUT:
maz[left]=FRONTIER; maz[left]=FRONTIER;
front_cells=g_slist_prepend(front_cells,(gpointer)left); front_cells=g_slist_prepend(front_cells,
GINT_TO_POINTER(left));
break; break;
case IN: case IN:
d=d|4; d=d|4;
@ -380,7 +383,8 @@ prim(guint pos, gchar *maz, guint x, guint y, gint rnd)
switch (maz[right]) { switch (maz[right]) {
case OUT: case OUT:
maz[right]=FRONTIER; maz[right]=FRONTIER;
front_cells=g_slist_prepend(front_cells,(gpointer)right); front_cells=g_slist_prepend(front_cells,
GINT_TO_POINTER(right));
break; break;
case IN: case IN:
d=d|8; d=d|8;
@ -414,16 +418,16 @@ prim(guint pos, gchar *maz, guint x, guint y, gint rnd)
switch (i) { switch (i) {
case 0: case 0:
maz[WALL_UP(pos)]=1; maz[WALL_UP(pos)]=IN;
break; break;
case 1: case 1:
maz[WALL_DOWN(pos)]=1; maz[WALL_DOWN(pos)]=IN;
break; break;
case 2: case 2:
maz[WALL_LEFT(pos)]=1; maz[WALL_LEFT(pos)]=IN;
break; break;
case 3: case 3:
maz[WALL_RIGHT(pos)]=1; maz[WALL_RIGHT(pos)]=IN;
break; break;
case 99: case 99:
break; break;
@ -564,16 +568,16 @@ prim_tileable(gchar *maz, guint x, guint y, gint rnd)
switch (i) { switch (i) {
case 0: case 0:
maz[WALL_UP_TILEABLE(pos)]=1; maz[WALL_UP_TILEABLE(pos)]=IN;
break; break;
case 1: case 1:
maz[WALL_DOWN_TILEABLE(pos)]=1; maz[WALL_DOWN_TILEABLE(pos)]=IN;
break; break;
case 2: case 2:
maz[WALL_LEFT_TILEABLE(pos)]=1; maz[WALL_LEFT_TILEABLE(pos)]=IN;
break; break;
case 3: case 3:
maz[WALL_RIGHT_TILEABLE(pos)]=1; maz[WALL_RIGHT_TILEABLE(pos)]=IN;
break; break;
case 99: case 99:
break; break;

View file

@ -60,8 +60,13 @@ get_colors (GDrawable *drawable,
gimp_palette_get_background (&bg[0], &bg[1], &bg[2]); gimp_palette_get_background (&bg[0], &bg[1], &bg[2]);
break; break;
case GRAYA_IMAGE: /* and again */ case GRAYA_IMAGE: /* and again */
gimp_palette_get_foreground (&fg[0], &fg[1], &fg[2]);
gimp_palette_get_background (&bg[0], &bg[1], &bg[2]);
fg[0] = INTENSITY (fg[0], fg[1], fg[2]);
bg[0] = INTENSITY (bg[0], bg[1], bg[2]);
fg[1] = 255; fg[1] = 255;
bg[1] = 255; bg[1] = 255;
break;
case GRAY_IMAGE: case GRAY_IMAGE:
gimp_palette_get_foreground (&fg[0], &fg[1], &fg[2]); gimp_palette_get_foreground (&fg[0], &fg[1], &fg[2]);
gimp_palette_get_background (&bg[0], &bg[1], &bg[2]); gimp_palette_get_background (&bg[0], &bg[1], &bg[2]);
@ -133,7 +138,7 @@ drawbox( GPixelRgn *dest_rgn,
if (high_size == 0) { if (high_size == 0) {
rowbuf = g_new(guint8, rowsize); rowbuf = g_new(guint8, rowsize);
} else if (rowsize > high_size) { } else if (rowsize > high_size) {
g_realloc(rowbuf, rowsize * sizeof(guint8) ); rowbuf = g_renew(guint8, rowbuf, rowsize);
} }
high_size = MAX(high_size, rowsize); high_size = MAX(high_size, rowsize);

View file

@ -1,3 +1,7 @@
2000-04-14 Sven Neumann <sven@gimp.org>
* de.po: small correction
Thu Apr 13 23:11:27 CEST 2000 Stanislav Brabec <utx@penguin.cz> Thu Apr 13 23:11:27 CEST 2000 Stanislav Brabec <utx@penguin.cz>
* cs.po: Updated translation. * cs.po: Updated translation.

View file

@ -7,9 +7,9 @@
# #
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: GIMP 1.1.18\n" "Project-Id-Version: GIMP 1.1.19\n"
"POT-Creation-Date: 2000-04-12 16:36+0200\n" "POT-Creation-Date: 2000-04-12 16:36+0200\n"
"PO-Revision-Date: 2000-04-12 16:37+02:00\n" "PO-Revision-Date: 2000-04-13 12:15+02:00\n"
"Last-Translator: Sven Neumann <sven@gimp.org>\n" "Last-Translator: Sven Neumann <sven@gimp.org>\n"
"Language-Team: German <de@li.org>\n" "Language-Team: German <de@li.org>\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
@ -4497,7 +4497,7 @@ msgstr "Zweite Zielfarbe"
#: plug-ins/common/mapcolor.c:348 #: plug-ins/common/mapcolor.c:348
msgid "<Image>/Filters/Colors/Map/Adjust FG-BG" msgid "<Image>/Filters/Colors/Map/Adjust FG-BG"
msgstr "<Image>/Filter/Farben/Abbilden/VG-HG regeln" msgstr "<Image>/Filter/Farben/Abbilden/VG-HG anpassen"
#: plug-ins/common/mapcolor.c:363 #: plug-ins/common/mapcolor.c:363
msgid "<Image>/Filters/Colors/Map/Color Range Mapping..." msgid "<Image>/Filters/Colors/Map/Color Range Mapping..."
@ -4508,12 +4508,12 @@ msgid ""
"Color Mapping / Adjust FG/BG:\n" "Color Mapping / Adjust FG/BG:\n"
"Cannot operate on gray/indexed images" "Cannot operate on gray/indexed images"
msgstr "" msgstr ""
"Farben vertauschen / VG/HG anpassen:\n" "Farben abbilden / VG/HG anpassen:\n"
"Kann diesen Filter nicht auf Graustufenbilder / indizierte Bilder anwenden" "Kann diesen Filter nicht auf Graustufenbilder / indizierte Bilder anwenden"
#: plug-ins/common/mapcolor.c:436 #: plug-ins/common/mapcolor.c:436
msgid "Adjusting Foreground/Background" msgid "Adjusting Foreground/Background"
msgstr "Ersetze Hintergrund-/Vordergrundfarbe" msgstr "Vordergrund-/Hintergrundfarbe anpassen"
#: plug-ins/common/mapcolor.c:484 #: plug-ins/common/mapcolor.c:484
msgid "Mapping colors" msgid "Mapping colors"