set the background using gimp_palette_get_background() in non-interactive

2000-12-07  Sven Neumann  <sven@gimp.org>

	* plug-ins/MapObject/mapobject_image.c: set the background using
	gimp_palette_get_background() in non-interactive mode too.
This commit is contained in:
Sven Neumann 2000-12-06 23:06:08 +00:00 committed by Sven Neumann
parent 9f0e1d4c86
commit db3fd7b11e
2 changed files with 18 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2000-12-07 Sven Neumann <sven@gimp.org>
* plug-ins/MapObject/mapobject_image.c: set the background using
gimp_palette_get_background() in non-interactive mode too.
2000-12-03 Sven Neumann <sven@gimp.org>
* app/gimpimage.c: when merging layers, do not set the layer mode

View File

@ -329,7 +329,8 @@ gint
image_setup (GimpDrawable *drawable,
gint interactive)
{
glong numbytes;
glong numbytes;
guchar r,g,b;
/* Set the tile cache size */
/* ======================= */
@ -354,6 +355,17 @@ image_setup (GimpDrawable *drawable,
maxcounter=(glong)width*(glong)height;
if (mapvals.transparent_background==TRUE)
gck_rgba_set(&background,0.0,0.0,0.0,0.0);
else
{
gimp_palette_get_background(&r,&g,&b);
background.r=(gdouble)r/255.0;
background.g=(gdouble)g/255.0;
background.b=(gdouble)b/255.0;
background.a=1.0;
}
/* Assume at least RGB */
/* =================== */