tools/pdbgen/lib.pl tools/pdbgen/pdb.pl tools/pdbgen/pdb/channel.pdb

2001-01-25  Sven Neumann  <sven@gimp.org>

	* tools/pdbgen/lib.pl
	* tools/pdbgen/pdb.pl
	* tools/pdbgen/pdb/channel.pdb
	* tools/pdbgen/pdb/palette.pdb
	* tools/pdbgen/pdb/tools.pdb: changed these with the help of
	Yosh. PDB functions take GimpRGB as color type now.

	* app/plug_in.c
	* app/pdb/channel_cmds.c
	* app/pdb/internal_procs.c
	* app/pdb/palette_cmds.c
	* app/pdb/procedural_db.[ch]
	* app/pdb/tools_cmds.c
	* libgimp/gimp.[ch]
	* libgimp/gimpchannel.[ch]
	* libgimp/gimpchannel_pdb.[ch]
	* libgimp/gimppalette_pdb.[ch]
	* libgimp/gimpprotocol.[ch]
	* libgimp/gimptools_pdb.[ch]: incremented Gimp protocol version
	and changed color type from array of chars to GimpRGB.

	* libgimp/Makefile.am
	* libgimp/gimppalette.[ch]: removed these files again

	* app/libgimp_glue.[ch]
	* libgimpwidgets/gimpcolorbutton.c
	* plug-ins/Lighting/lighting_main.c
	* plug-ins/Lighting/lighting_preview.c
	* plug-ins/MapObject/mapobject_image.c
	* plug-ins/MapObject/mapobject_main.c
	* plug-ins/MapObject/mapobject_preview.c
	* plug-ins/common/apply_lens.c
	* plug-ins/common/blinds.c
	* plug-ins/common/borderaverage.c
	* plug-ins/common/checkerboard.c
	* plug-ins/common/colorify.c
	* plug-ins/common/colortoalpha.c
	* plug-ins/common/cubism.c
	* plug-ins/common/exchange.c
	* plug-ins/common/film.c
	* plug-ins/common/gif.c
	* plug-ins/common/grid.c
	* plug-ins/common/mapcolor.c
	* plug-ins/common/mblur.c
	* plug-ins/common/nova.c
	* plug-ins/common/papertile.c
	* plug-ins/common/png.c
	* plug-ins/common/polar.c
	* plug-ins/common/psd.c
	* plug-ins/common/semiflatten.c
	* plug-ins/common/sinus.c
	* plug-ins/common/sparkle.c
	* plug-ins/common/tiff.c
	* plug-ins/common/vpropagate.c
	* plug-ins/common/warp.c
	* plug-ins/common/whirlpinch.c
	* plug-ins/gap/gap_filter_iterators.c
	* plug-ins/gap/gap_mov_dialog.c
	* plug-ins/gdyntext/gdyntext.c
	* plug-ins/gfig/gfig.c
	* plug-ins/gfli/gfli.c
	* plug-ins/ifscompose/ifscompose.c
	* plug-ins/maze/handy.c
	* plug-ins/mosaic/mosaic.c
	* plug-ins/pagecurl/pagecurl.c
	* plug-ins/script-fu/script-fu-scripts.c
	* plug-ins/script-fu/script-fu.c
	* plug-ins/xjt/xjt.c: changed accordingly. A few plug-ins need
	to be looked at more closely after this change. I tried to put
	FIXME comments into those.
This commit is contained in:
Sven Neumann 2001-01-25 01:20:05 +00:00 committed by Sven Neumann
parent 7a4260da70
commit 0d533abbdd
105 changed files with 992 additions and 1613 deletions

View File

@ -1,3 +1,76 @@
2001-01-25 Sven Neumann <sven@gimp.org>
* tools/pdbgen/lib.pl
* tools/pdbgen/pdb.pl
* tools/pdbgen/pdb/channel.pdb
* tools/pdbgen/pdb/palette.pdb
* tools/pdbgen/pdb/tools.pdb: changed these with the help of
Yosh. PDB functions take GimpRGB as color type now.
* app/plug_in.c
* app/pdb/channel_cmds.c
* app/pdb/internal_procs.c
* app/pdb/palette_cmds.c
* app/pdb/procedural_db.[ch]
* app/pdb/tools_cmds.c
* libgimp/gimp.[ch]
* libgimp/gimpchannel.[ch]
* libgimp/gimpchannel_pdb.[ch]
* libgimp/gimppalette_pdb.[ch]
* libgimp/gimpprotocol.[ch]
* libgimp/gimptools_pdb.[ch]: incremented Gimp protocol version
and changed color type from array of chars to GimpRGB.
* libgimp/Makefile.am
* libgimp/gimppalette.[ch]: removed these files again
* app/libgimp_glue.[ch]
* libgimpwidgets/gimpcolorbutton.c
* plug-ins/Lighting/lighting_main.c
* plug-ins/Lighting/lighting_preview.c
* plug-ins/MapObject/mapobject_image.c
* plug-ins/MapObject/mapobject_main.c
* plug-ins/MapObject/mapobject_preview.c
* plug-ins/common/apply_lens.c
* plug-ins/common/blinds.c
* plug-ins/common/borderaverage.c
* plug-ins/common/checkerboard.c
* plug-ins/common/colorify.c
* plug-ins/common/colortoalpha.c
* plug-ins/common/cubism.c
* plug-ins/common/exchange.c
* plug-ins/common/film.c
* plug-ins/common/gif.c
* plug-ins/common/grid.c
* plug-ins/common/mapcolor.c
* plug-ins/common/mblur.c
* plug-ins/common/nova.c
* plug-ins/common/papertile.c
* plug-ins/common/png.c
* plug-ins/common/polar.c
* plug-ins/common/psd.c
* plug-ins/common/semiflatten.c
* plug-ins/common/sinus.c
* plug-ins/common/sparkle.c
* plug-ins/common/tiff.c
* plug-ins/common/vpropagate.c
* plug-ins/common/warp.c
* plug-ins/common/whirlpinch.c
* plug-ins/gap/gap_filter_iterators.c
* plug-ins/gap/gap_mov_dialog.c
* plug-ins/gdyntext/gdyntext.c
* plug-ins/gfig/gfig.c
* plug-ins/gfli/gfli.c
* plug-ins/ifscompose/ifscompose.c
* plug-ins/maze/handy.c
* plug-ins/mosaic/mosaic.c
* plug-ins/pagecurl/pagecurl.c
* plug-ins/script-fu/script-fu-scripts.c
* plug-ins/script-fu/script-fu.c
* plug-ins/xjt/xjt.c: changed accordingly. A few plug-ins need
to be looked at more closely after this change. I tried to put
FIXME comments into those.
2001-01-24 Michael Natterer <mitch@gimp.org>
* Makefile.am

View File

@ -2447,12 +2447,16 @@ plug_in_add_to_db (void)
if (proc_def->image_types)
{
return_vals = procedural_db_execute ("gimp_register_save_handler", args);
return_vals =
procedural_db_execute ("gimp_register_save_handler",
args);
g_free (return_vals);
}
else
{
return_vals = procedural_db_execute ("gimp_register_magic_load_handler", args);
return_vals =
procedural_db_execute ("gimp_register_magic_load_handler",
args);
g_free (return_vals);
}
}
@ -2904,9 +2908,8 @@ plug_in_params_to_args (GPParam *params,
{
Argument *args;
gchar **stringarray;
guchar *colorarray;
gint count;
gint i, j;
gint count;
gint i, j;
if (nparams == 0)
return NULL;
@ -2942,7 +2945,8 @@ plug_in_params_to_args (GPParam *params,
{
count = args[i-1].value.pdb_int;
args[i].value.pdb_pointer = g_new (gint32, count);
memcpy (args[i].value.pdb_pointer, params[i].data.d_int32array, count * 4);
memcpy (args[i].value.pdb_pointer,
params[i].data.d_int32array, count * 4);
}
else
{
@ -2954,7 +2958,8 @@ plug_in_params_to_args (GPParam *params,
{
count = args[i-1].value.pdb_int;
args[i].value.pdb_pointer = g_new (gint16, count);
memcpy (args[i].value.pdb_pointer, params[i].data.d_int16array, count * 2);
memcpy (args[i].value.pdb_pointer,
params[i].data.d_int16array, count * 2);
}
else
{
@ -2966,7 +2971,8 @@ plug_in_params_to_args (GPParam *params,
{
count = args[i-1].value.pdb_int;
args[i].value.pdb_pointer = g_new (gint8, count);
memcpy (args[i].value.pdb_pointer, params[i].data.d_int8array, count);
memcpy (args[i].value.pdb_pointer,
params[i].data.d_int8array, count);
}
else
{
@ -2978,7 +2984,8 @@ plug_in_params_to_args (GPParam *params,
{
count = args[i-1].value.pdb_int;
args[i].value.pdb_pointer = g_new (gdouble, count);
memcpy (args[i].value.pdb_pointer, params[i].data.d_floatarray, count * 8);
memcpy (args[i].value.pdb_pointer,
params[i].data.d_floatarray, count * 8);
}
else
{
@ -2988,7 +2995,8 @@ plug_in_params_to_args (GPParam *params,
case PDB_STRINGARRAY:
if (full_copy)
{
args[i].value.pdb_pointer = g_new (gchar*, args[i-1].value.pdb_int);
args[i].value.pdb_pointer = g_new (gchar *,
args[i-1].value.pdb_int);
stringarray = args[i].value.pdb_pointer;
for (j = 0; j < args[i-1].value.pdb_int; j++)
@ -3000,11 +3008,7 @@ plug_in_params_to_args (GPParam *params,
}
break;
case PDB_COLOR:
args[i].value.pdb_pointer = g_new (guchar, 3);
colorarray = args[i].value.pdb_pointer;
colorarray[0] = params[i].data.d_color.red;
colorarray[1] = params[i].data.d_color.green;
colorarray[2] = params[i].data.d_color.blue;
args[i].value.pdb_color = params[i].data.d_color;
break;
case PDB_REGION:
g_message ("the \"region\" arg type is not currently supported");
@ -3038,7 +3042,7 @@ plug_in_params_to_args (GPParam *params,
args[i].value.pdb_pointer =
gimp_parasite_copy ((GimpParasite *) &(params[i].data.d_parasite));
else
args[i].value.pdb_pointer = (void *)&(params[i].data.d_parasite);
args[i].value.pdb_pointer = (gpointer) &(params[i].data.d_parasite);
break;
case PDB_STATUS:
args[i].value.pdb_int = params[i].data.d_status;
@ -3058,8 +3062,7 @@ plug_in_args_to_params (Argument *args,
{
GPParam *params;
gchar **stringarray;
guchar *colorarray;
gint i, j;
gint i, j;
if (nargs == 0)
return NULL;
@ -3157,19 +3160,7 @@ plug_in_args_to_params (Argument *args,
}
break;
case PDB_COLOR:
colorarray = args[i].value.pdb_pointer;
if( colorarray )
{
params[i].data.d_color.red = colorarray[0];
params[i].data.d_color.green = colorarray[1];
params[i].data.d_color.blue = colorarray[2];
}
else
{
params[i].data.d_color.red = 0;
params[i].data.d_color.green = 0;
params[i].data.d_color.blue = 0;
}
params[i].data.d_color = args[i].value.pdb_color;
break;
case PDB_REGION:
g_message ("the \"region\" arg type is not currently supported");
@ -3373,7 +3364,6 @@ plug_in_args_destroy (Argument *args,
}
break;
case PDB_COLOR:
g_free (args[i].value.pdb_pointer);
break;
case PDB_REGION:
g_message ("the \"region\" arg type is not currently supported");

View File

@ -2447,12 +2447,16 @@ plug_in_add_to_db (void)
if (proc_def->image_types)
{
return_vals = procedural_db_execute ("gimp_register_save_handler", args);
return_vals =
procedural_db_execute ("gimp_register_save_handler",
args);
g_free (return_vals);
}
else
{
return_vals = procedural_db_execute ("gimp_register_magic_load_handler", args);
return_vals =
procedural_db_execute ("gimp_register_magic_load_handler",
args);
g_free (return_vals);
}
}
@ -2904,9 +2908,8 @@ plug_in_params_to_args (GPParam *params,
{
Argument *args;
gchar **stringarray;
guchar *colorarray;
gint count;
gint i, j;
gint count;
gint i, j;
if (nparams == 0)
return NULL;
@ -2942,7 +2945,8 @@ plug_in_params_to_args (GPParam *params,
{
count = args[i-1].value.pdb_int;
args[i].value.pdb_pointer = g_new (gint32, count);
memcpy (args[i].value.pdb_pointer, params[i].data.d_int32array, count * 4);
memcpy (args[i].value.pdb_pointer,
params[i].data.d_int32array, count * 4);
}
else
{
@ -2954,7 +2958,8 @@ plug_in_params_to_args (GPParam *params,
{
count = args[i-1].value.pdb_int;
args[i].value.pdb_pointer = g_new (gint16, count);
memcpy (args[i].value.pdb_pointer, params[i].data.d_int16array, count * 2);
memcpy (args[i].value.pdb_pointer,
params[i].data.d_int16array, count * 2);
}
else
{
@ -2966,7 +2971,8 @@ plug_in_params_to_args (GPParam *params,
{
count = args[i-1].value.pdb_int;
args[i].value.pdb_pointer = g_new (gint8, count);
memcpy (args[i].value.pdb_pointer, params[i].data.d_int8array, count);
memcpy (args[i].value.pdb_pointer,
params[i].data.d_int8array, count);
}
else
{
@ -2978,7 +2984,8 @@ plug_in_params_to_args (GPParam *params,
{
count = args[i-1].value.pdb_int;
args[i].value.pdb_pointer = g_new (gdouble, count);
memcpy (args[i].value.pdb_pointer, params[i].data.d_floatarray, count * 8);
memcpy (args[i].value.pdb_pointer,
params[i].data.d_floatarray, count * 8);
}
else
{
@ -2988,7 +2995,8 @@ plug_in_params_to_args (GPParam *params,
case PDB_STRINGARRAY:
if (full_copy)
{
args[i].value.pdb_pointer = g_new (gchar*, args[i-1].value.pdb_int);
args[i].value.pdb_pointer = g_new (gchar *,
args[i-1].value.pdb_int);
stringarray = args[i].value.pdb_pointer;
for (j = 0; j < args[i-1].value.pdb_int; j++)
@ -3000,11 +3008,7 @@ plug_in_params_to_args (GPParam *params,
}
break;
case PDB_COLOR:
args[i].value.pdb_pointer = g_new (guchar, 3);
colorarray = args[i].value.pdb_pointer;
colorarray[0] = params[i].data.d_color.red;
colorarray[1] = params[i].data.d_color.green;
colorarray[2] = params[i].data.d_color.blue;
args[i].value.pdb_color = params[i].data.d_color;
break;
case PDB_REGION:
g_message ("the \"region\" arg type is not currently supported");
@ -3038,7 +3042,7 @@ plug_in_params_to_args (GPParam *params,
args[i].value.pdb_pointer =
gimp_parasite_copy ((GimpParasite *) &(params[i].data.d_parasite));
else
args[i].value.pdb_pointer = (void *)&(params[i].data.d_parasite);
args[i].value.pdb_pointer = (gpointer) &(params[i].data.d_parasite);
break;
case PDB_STATUS:
args[i].value.pdb_int = params[i].data.d_status;
@ -3058,8 +3062,7 @@ plug_in_args_to_params (Argument *args,
{
GPParam *params;
gchar **stringarray;
guchar *colorarray;
gint i, j;
gint i, j;
if (nargs == 0)
return NULL;
@ -3157,19 +3160,7 @@ plug_in_args_to_params (Argument *args,
}
break;
case PDB_COLOR:
colorarray = args[i].value.pdb_pointer;
if( colorarray )
{
params[i].data.d_color.red = colorarray[0];
params[i].data.d_color.green = colorarray[1];
params[i].data.d_color.blue = colorarray[2];
}
else
{
params[i].data.d_color.red = 0;
params[i].data.d_color.green = 0;
params[i].data.d_color.blue = 0;
}
params[i].data.d_color = args[i].value.pdb_color;
break;
case PDB_REGION:
g_message ("the \"region\" arg type is not currently supported");
@ -3373,7 +3364,6 @@ plug_in_args_destroy (Argument *args,
}
break;
case PDB_COLOR:
g_free (args[i].value.pdb_pointer);
break;
case PDB_REGION:
g_message ("the \"region\" arg type is not currently supported");

View File

@ -2447,12 +2447,16 @@ plug_in_add_to_db (void)
if (proc_def->image_types)
{
return_vals = procedural_db_execute ("gimp_register_save_handler", args);
return_vals =
procedural_db_execute ("gimp_register_save_handler",
args);
g_free (return_vals);
}
else
{
return_vals = procedural_db_execute ("gimp_register_magic_load_handler", args);
return_vals =
procedural_db_execute ("gimp_register_magic_load_handler",
args);
g_free (return_vals);
}
}
@ -2904,9 +2908,8 @@ plug_in_params_to_args (GPParam *params,
{
Argument *args;
gchar **stringarray;
guchar *colorarray;
gint count;
gint i, j;
gint count;
gint i, j;
if (nparams == 0)
return NULL;
@ -2942,7 +2945,8 @@ plug_in_params_to_args (GPParam *params,
{
count = args[i-1].value.pdb_int;
args[i].value.pdb_pointer = g_new (gint32, count);
memcpy (args[i].value.pdb_pointer, params[i].data.d_int32array, count * 4);
memcpy (args[i].value.pdb_pointer,
params[i].data.d_int32array, count * 4);
}
else
{
@ -2954,7 +2958,8 @@ plug_in_params_to_args (GPParam *params,
{
count = args[i-1].value.pdb_int;
args[i].value.pdb_pointer = g_new (gint16, count);
memcpy (args[i].value.pdb_pointer, params[i].data.d_int16array, count * 2);
memcpy (args[i].value.pdb_pointer,
params[i].data.d_int16array, count * 2);
}
else
{
@ -2966,7 +2971,8 @@ plug_in_params_to_args (GPParam *params,
{
count = args[i-1].value.pdb_int;
args[i].value.pdb_pointer = g_new (gint8, count);
memcpy (args[i].value.pdb_pointer, params[i].data.d_int8array, count);
memcpy (args[i].value.pdb_pointer,
params[i].data.d_int8array, count);
}
else
{
@ -2978,7 +2984,8 @@ plug_in_params_to_args (GPParam *params,
{
count = args[i-1].value.pdb_int;
args[i].value.pdb_pointer = g_new (gdouble, count);
memcpy (args[i].value.pdb_pointer, params[i].data.d_floatarray, count * 8);
memcpy (args[i].value.pdb_pointer,
params[i].data.d_floatarray, count * 8);
}
else
{
@ -2988,7 +2995,8 @@ plug_in_params_to_args (GPParam *params,
case PDB_STRINGARRAY:
if (full_copy)
{
args[i].value.pdb_pointer = g_new (gchar*, args[i-1].value.pdb_int);
args[i].value.pdb_pointer = g_new (gchar *,
args[i-1].value.pdb_int);
stringarray = args[i].value.pdb_pointer;
for (j = 0; j < args[i-1].value.pdb_int; j++)
@ -3000,11 +3008,7 @@ plug_in_params_to_args (GPParam *params,
}
break;
case PDB_COLOR:
args[i].value.pdb_pointer = g_new (guchar, 3);
colorarray = args[i].value.pdb_pointer;
colorarray[0] = params[i].data.d_color.red;
colorarray[1] = params[i].data.d_color.green;
colorarray[2] = params[i].data.d_color.blue;
args[i].value.pdb_color = params[i].data.d_color;
break;
case PDB_REGION:
g_message ("the \"region\" arg type is not currently supported");
@ -3038,7 +3042,7 @@ plug_in_params_to_args (GPParam *params,
args[i].value.pdb_pointer =
gimp_parasite_copy ((GimpParasite *) &(params[i].data.d_parasite));
else
args[i].value.pdb_pointer = (void *)&(params[i].data.d_parasite);
args[i].value.pdb_pointer = (gpointer) &(params[i].data.d_parasite);
break;
case PDB_STATUS:
args[i].value.pdb_int = params[i].data.d_status;
@ -3058,8 +3062,7 @@ plug_in_args_to_params (Argument *args,
{
GPParam *params;
gchar **stringarray;
guchar *colorarray;
gint i, j;
gint i, j;
if (nargs == 0)
return NULL;
@ -3157,19 +3160,7 @@ plug_in_args_to_params (Argument *args,
}
break;
case PDB_COLOR:
colorarray = args[i].value.pdb_pointer;
if( colorarray )
{
params[i].data.d_color.red = colorarray[0];
params[i].data.d_color.green = colorarray[1];
params[i].data.d_color.blue = colorarray[2];
}
else
{
params[i].data.d_color.red = 0;
params[i].data.d_color.green = 0;
params[i].data.d_color.blue = 0;
}
params[i].data.d_color = args[i].value.pdb_color;
break;
case PDB_REGION:
g_message ("the \"region\" arg type is not currently supported");
@ -3373,7 +3364,6 @@ plug_in_args_destroy (Argument *args,
}
break;
case PDB_COLOR:
g_free (args[i].value.pdb_pointer);
break;
case PDB_REGION:
g_message ("the \"region\" arg type is not currently supported");

View File

@ -29,113 +29,41 @@
gboolean
gimp_palette_set_foreground (guchar r,
guchar g,
guchar b)
gimp_palette_set_foreground (const GimpRGB *rgb)
{
GimpRGB color;
g_return_val_if_fail (rgb != NULL, FALSE);
gimp_rgba_set_uchar (&color, r, g, b, 255);
gimp_context_set_foreground (NULL, &color);
gimp_context_set_foreground (NULL, rgb);
return TRUE;
}
gboolean
gimp_palette_get_foreground (guchar *r,
guchar *g,
guchar *b)
gimp_palette_get_foreground (GimpRGB *rgb)
{
GimpRGB color;
g_return_val_if_fail (rgb != NULL, FALSE);
gimp_context_get_foreground (NULL, &color);
gimp_rgb_get_uchar (&color, r, g, b);
gimp_context_get_foreground (NULL, rgb);
return TRUE;
}
gboolean
gimp_palette_set_foreground_rgb (const GimpRGB *rgb)
gimp_palette_set_background (const GimpRGB *rgb)
{
guchar r, g, b;
g_return_val_if_fail (rgb != NULL, FALSE);
gimp_rgb_get_uchar (rgb, &r, &g, &b);
return gimp_palette_set_foreground (r, g, b);
}
gboolean
gimp_palette_get_foreground_rgb (GimpRGB *rgb)
{
guchar r, g, b;
g_return_val_if_fail (rgb != NULL, FALSE);
if (gimp_palette_get_foreground (&r, &g, &b))
{
gimp_rgb_set_uchar (rgb, r, g, b);
return TRUE;
}
return FALSE;
}
gboolean
gimp_palette_set_background (guchar r,
guchar g,
guchar b)
{
GimpRGB color;
gimp_rgba_set_uchar (&color, r, g, b, 255);
gimp_context_set_background (NULL, &color);
gimp_context_set_background (NULL, rgb);
return TRUE;
}
gboolean
gimp_palette_get_background (guchar *r,
guchar *g,
guchar *b)
gimp_palette_get_background (GimpRGB *rgb)
{
GimpRGB color;
g_return_val_if_fail (rgb != NULL, FALSE);
gimp_context_get_background (NULL, &color);
gimp_rgb_get_uchar (&color, r, g, b);
gimp_context_get_background (NULL, rgb);
return TRUE;
}
gboolean
gimp_palette_set_background_rgb (const GimpRGB *rgb)
{
guchar r, g, b;
g_return_val_if_fail (rgb != NULL, FALSE);
gimp_rgb_get_uchar (rgb, &r, &g, &b);
return gimp_palette_set_background (r, g, b);
}
gboolean
gimp_palette_get_background_rgb (GimpRGB *rgb)
{
guchar r, g, b;
g_return_val_if_fail (rgb != NULL, FALSE);
if (gimp_palette_get_background (&r, &g, &b))
{
gimp_rgb_set_uchar (rgb, r, g, b);
return TRUE;
}
return FALSE;
}

View File

@ -26,25 +26,10 @@
*/
gboolean gimp_palette_set_foreground (guchar r,
guchar g,
guchar b);
gboolean gimp_palette_get_foreground (guchar *r,
guchar *g,
guchar *b);
gboolean gimp_palette_set_foreground_rgb (const GimpRGB *color);
gboolean gimp_palette_get_foreground_rgb (GimpRGB *rgb);
gboolean gimp_palette_set_background (guchar r,
guchar g,
guchar b);
gboolean gimp_palette_get_background (guchar *r,
guchar *g,
guchar *b);
gboolean gimp_palette_set_background_rgb (const GimpRGB *color);
gboolean gimp_palette_get_background_rgb (GimpRGB *rgb);
gboolean gimp_palette_set_foreground (const GimpRGB *color);
gboolean gimp_palette_get_foreground (GimpRGB *rgb);
gboolean gimp_palette_set_background (const GimpRGB *color);
gboolean gimp_palette_get_background (GimpRGB *rgb);
#endif /* __LIBGIMP_GLUE_H__ */

View File

@ -2447,12 +2447,16 @@ plug_in_add_to_db (void)
if (proc_def->image_types)
{
return_vals = procedural_db_execute ("gimp_register_save_handler", args);
return_vals =
procedural_db_execute ("gimp_register_save_handler",
args);
g_free (return_vals);
}
else
{
return_vals = procedural_db_execute ("gimp_register_magic_load_handler", args);
return_vals =
procedural_db_execute ("gimp_register_magic_load_handler",
args);
g_free (return_vals);
}
}
@ -2904,9 +2908,8 @@ plug_in_params_to_args (GPParam *params,
{
Argument *args;
gchar **stringarray;
guchar *colorarray;
gint count;
gint i, j;
gint count;
gint i, j;
if (nparams == 0)
return NULL;
@ -2942,7 +2945,8 @@ plug_in_params_to_args (GPParam *params,
{
count = args[i-1].value.pdb_int;
args[i].value.pdb_pointer = g_new (gint32, count);
memcpy (args[i].value.pdb_pointer, params[i].data.d_int32array, count * 4);
memcpy (args[i].value.pdb_pointer,
params[i].data.d_int32array, count * 4);
}
else
{
@ -2954,7 +2958,8 @@ plug_in_params_to_args (GPParam *params,
{
count = args[i-1].value.pdb_int;
args[i].value.pdb_pointer = g_new (gint16, count);
memcpy (args[i].value.pdb_pointer, params[i].data.d_int16array, count * 2);
memcpy (args[i].value.pdb_pointer,
params[i].data.d_int16array, count * 2);
}
else
{
@ -2966,7 +2971,8 @@ plug_in_params_to_args (GPParam *params,
{
count = args[i-1].value.pdb_int;
args[i].value.pdb_pointer = g_new (gint8, count);
memcpy (args[i].value.pdb_pointer, params[i].data.d_int8array, count);
memcpy (args[i].value.pdb_pointer,
params[i].data.d_int8array, count);
}
else
{
@ -2978,7 +2984,8 @@ plug_in_params_to_args (GPParam *params,
{
count = args[i-1].value.pdb_int;
args[i].value.pdb_pointer = g_new (gdouble, count);
memcpy (args[i].value.pdb_pointer, params[i].data.d_floatarray, count * 8);
memcpy (args[i].value.pdb_pointer,
params[i].data.d_floatarray, count * 8);
}
else
{
@ -2988,7 +2995,8 @@ plug_in_params_to_args (GPParam *params,
case PDB_STRINGARRAY:
if (full_copy)
{
args[i].value.pdb_pointer = g_new (gchar*, args[i-1].value.pdb_int);
args[i].value.pdb_pointer = g_new (gchar *,
args[i-1].value.pdb_int);
stringarray = args[i].value.pdb_pointer;
for (j = 0; j < args[i-1].value.pdb_int; j++)
@ -3000,11 +3008,7 @@ plug_in_params_to_args (GPParam *params,
}
break;
case PDB_COLOR:
args[i].value.pdb_pointer = g_new (guchar, 3);
colorarray = args[i].value.pdb_pointer;
colorarray[0] = params[i].data.d_color.red;
colorarray[1] = params[i].data.d_color.green;
colorarray[2] = params[i].data.d_color.blue;
args[i].value.pdb_color = params[i].data.d_color;
break;
case PDB_REGION:
g_message ("the \"region\" arg type is not currently supported");
@ -3038,7 +3042,7 @@ plug_in_params_to_args (GPParam *params,
args[i].value.pdb_pointer =
gimp_parasite_copy ((GimpParasite *) &(params[i].data.d_parasite));
else
args[i].value.pdb_pointer = (void *)&(params[i].data.d_parasite);
args[i].value.pdb_pointer = (gpointer) &(params[i].data.d_parasite);
break;
case PDB_STATUS:
args[i].value.pdb_int = params[i].data.d_status;
@ -3058,8 +3062,7 @@ plug_in_args_to_params (Argument *args,
{
GPParam *params;
gchar **stringarray;
guchar *colorarray;
gint i, j;
gint i, j;
if (nargs == 0)
return NULL;
@ -3157,19 +3160,7 @@ plug_in_args_to_params (Argument *args,
}
break;
case PDB_COLOR:
colorarray = args[i].value.pdb_pointer;
if( colorarray )
{
params[i].data.d_color.red = colorarray[0];
params[i].data.d_color.green = colorarray[1];
params[i].data.d_color.blue = colorarray[2];
}
else
{
params[i].data.d_color.red = 0;
params[i].data.d_color.green = 0;
params[i].data.d_color.blue = 0;
}
params[i].data.d_color = args[i].value.pdb_color;
break;
case PDB_REGION:
g_message ("the \"region\" arg type is not currently supported");
@ -3373,7 +3364,6 @@ plug_in_args_destroy (Argument *args,
}
break;
case PDB_COLOR:
g_free (args[i].value.pdb_pointer);
break;
case PDB_REGION:
g_message ("the \"region\" arg type is not currently supported");

View File

@ -44,7 +44,6 @@ static ProcRecord channel_set_show_masked_proc;
static ProcRecord channel_get_opacity_proc;
static ProcRecord channel_set_opacity_proc;
static ProcRecord channel_get_color_proc;
static ProcRecord channel_set_color_proc;
static ProcRecord channel_get_tattoo_proc;
static ProcRecord channel_set_tattoo_proc;
@ -63,7 +62,6 @@ register_channel_procs (void)
procedural_db_register (&channel_get_opacity_proc);
procedural_db_register (&channel_set_opacity_proc);
procedural_db_register (&channel_get_color_proc);
procedural_db_register (&channel_set_color_proc);
procedural_db_register (&channel_get_tattoo_proc);
procedural_db_register (&channel_set_tattoo_proc);
}
@ -78,7 +76,7 @@ channel_new_invoker (Argument *args)
gint32 height;
gchar *name;
gdouble opacity;
guchar *color;
GimpRGB *color;
Channel *channel = NULL;
gimage = pdb_id_to_image (args[0].value.pdb_int);
@ -101,17 +99,13 @@ channel_new_invoker (Argument *args)
if (opacity < 0.0 || opacity > 100.0)
success = FALSE;
color = (guchar *) args[5].value.pdb_pointer;
color = (GimpRGB *) args[5].value.pdb_pointer;
if (success)
{
GimpRGB rgb_color;
gimp_rgb_set_uchar (&rgb_color,
color[0], color[1], color[2]);
GimpRGB rgb_color = *color;
rgb_color.a = opacity / 100.0;
channel = channel_new (gimage, width, height, name, &rgb_color);
success = channel != NULL;
}
@ -699,7 +693,7 @@ channel_get_color_invoker (Argument *args)
gboolean success = TRUE;
Argument *return_args;
Channel *channel;
guchar *color = NULL;
GimpRGB *color = NULL;
channel = (GimpChannel *) gimp_drawable_get_by_ID (args[0].value.pdb_int);
if (channel == NULL)
@ -707,12 +701,8 @@ channel_get_color_invoker (Argument *args)
if (success)
{
color = g_new (guchar, 3);
gimp_rgb_get_uchar (&channel->color,
&color[RED_PIX],
&color[GREEN_PIX],
&color[BLUE_PIX]);
color = g_new (GimpRGB, 1);
*color = channel->color;
}
return_args = procedural_db_return_args (&channel_get_color_proc, success);
@ -757,65 +747,6 @@ static ProcRecord channel_get_color_proc =
{ { channel_get_color_invoker } }
};
static Argument *
channel_set_color_invoker (Argument *args)
{
gboolean success = TRUE;
Channel *channel;
guchar *color;
channel = (GimpChannel *) gimp_drawable_get_by_ID (args[0].value.pdb_int);
if (channel == NULL)
success = FALSE;
color = (guchar *) args[1].value.pdb_pointer;
if (success)
{
GimpRGB rgb_color;
gimp_rgba_set_uchar (&rgb_color,
color[0],
color[1],
color[2],
(guchar) (channel->color.a * 255.999));
channel_set_color(channel, &rgb_color);
}
return procedural_db_return_args (&channel_set_color_proc, success);
}
static ProcArg channel_set_color_inargs[] =
{
{
PDB_CHANNEL,
"channel",
"The channel"
},
{
PDB_COLOR,
"color",
"The new channel compositing color"
}
};
static ProcRecord channel_set_color_proc =
{
"gimp_channel_set_color",
"Set the compositing color of the specified channel.",
"This procedure sets the specified channel's compositing color.",
"Spencer Kimball & Peter Mattis",
"Spencer Kimball & Peter Mattis",
"1995-1996",
PDB_INTERNAL,
2,
channel_set_color_inargs,
0,
NULL,
{ { channel_set_color_invoker } }
};
static Argument *
channel_get_tattoo_invoker (Argument *args)
{

View File

@ -261,10 +261,10 @@ procedural_db_run_proc (gchar *name,
case PDB_INT16:
case PDB_INT8:
case PDB_DISPLAY:
params[i].value.pdb_int = (gint32) va_arg (args, int);
params[i].value.pdb_int = (gint32) va_arg (args, gint);
break;
case PDB_FLOAT:
params[i].value.pdb_float = (gdouble) va_arg (args, double);
params[i].value.pdb_float = (gdouble) va_arg (args, gdouble);
break;
case PDB_STRING:
case PDB_INT32ARRAY:
@ -272,8 +272,10 @@ procedural_db_run_proc (gchar *name,
case PDB_INT8ARRAY:
case PDB_FLOATARRAY:
case PDB_STRINGARRAY:
params[i].value.pdb_pointer = va_arg (args, gpointer);
break;
case PDB_COLOR:
params[i].value.pdb_pointer = va_arg (args, void *);
params[i].value.pdb_color = (GimpRGB) va_arg (args, GimpRGB);
break;
case PDB_REGION:
break;
@ -284,13 +286,13 @@ procedural_db_run_proc (gchar *name,
case PDB_SELECTION:
case PDB_BOUNDARY:
case PDB_PATH:
params[i].value.pdb_int = (gint32) va_arg (args, int);
params[i].value.pdb_int = (gint32) va_arg (args, gint);
break;
case PDB_PARASITE:
params[i].value.pdb_pointer = va_arg (args, void *);
params[i].value.pdb_pointer = va_arg (args, gpointer);
break;
case PDB_STATUS:
params[i].value.pdb_int = (gint32) va_arg (args, int);
params[i].value.pdb_int = (gint32) va_arg (args, gint);
break;
case PDB_END:
break;

View File

@ -22,13 +22,14 @@
struct _Argument
{
PDBArgType arg_type; /* argument type */
PDBArgType arg_type; /* argument type */
union _ArgValue
{
gint32 pdb_int; /* Integer type */
gint32 pdb_int; /* Integer type */
gdouble pdb_float; /* Floating point type */
gpointer pdb_pointer; /* Pointer type */
gpointer pdb_pointer; /* Pointer type */
GimpRGB pdb_color; /* Color type */
} value;
};

View File

@ -261,10 +261,10 @@ procedural_db_run_proc (gchar *name,
case PDB_INT16:
case PDB_INT8:
case PDB_DISPLAY:
params[i].value.pdb_int = (gint32) va_arg (args, int);
params[i].value.pdb_int = (gint32) va_arg (args, gint);
break;
case PDB_FLOAT:
params[i].value.pdb_float = (gdouble) va_arg (args, double);
params[i].value.pdb_float = (gdouble) va_arg (args, gdouble);
break;
case PDB_STRING:
case PDB_INT32ARRAY:
@ -272,8 +272,10 @@ procedural_db_run_proc (gchar *name,
case PDB_INT8ARRAY:
case PDB_FLOATARRAY:
case PDB_STRINGARRAY:
params[i].value.pdb_pointer = va_arg (args, gpointer);
break;
case PDB_COLOR:
params[i].value.pdb_pointer = va_arg (args, void *);
params[i].value.pdb_color = (GimpRGB) va_arg (args, GimpRGB);
break;
case PDB_REGION:
break;
@ -284,13 +286,13 @@ procedural_db_run_proc (gchar *name,
case PDB_SELECTION:
case PDB_BOUNDARY:
case PDB_PATH:
params[i].value.pdb_int = (gint32) va_arg (args, int);
params[i].value.pdb_int = (gint32) va_arg (args, gint);
break;
case PDB_PARASITE:
params[i].value.pdb_pointer = va_arg (args, void *);
params[i].value.pdb_pointer = va_arg (args, gpointer);
break;
case PDB_STATUS:
params[i].value.pdb_int = (gint32) va_arg (args, int);
params[i].value.pdb_int = (gint32) va_arg (args, gint);
break;
case PDB_END:
break;

View File

@ -22,13 +22,14 @@
struct _Argument
{
PDBArgType arg_type; /* argument type */
PDBArgType arg_type; /* argument type */
union _ArgValue
{
gint32 pdb_int; /* Integer type */
gint32 pdb_int; /* Integer type */
gdouble pdb_float; /* Floating point type */
gpointer pdb_pointer; /* Pointer type */
gpointer pdb_pointer; /* Pointer type */
GimpRGB pdb_color; /* Color type */
} value;
};

View File

@ -261,10 +261,10 @@ procedural_db_run_proc (gchar *name,
case PDB_INT16:
case PDB_INT8:
case PDB_DISPLAY:
params[i].value.pdb_int = (gint32) va_arg (args, int);
params[i].value.pdb_int = (gint32) va_arg (args, gint);
break;
case PDB_FLOAT:
params[i].value.pdb_float = (gdouble) va_arg (args, double);
params[i].value.pdb_float = (gdouble) va_arg (args, gdouble);
break;
case PDB_STRING:
case PDB_INT32ARRAY:
@ -272,8 +272,10 @@ procedural_db_run_proc (gchar *name,
case PDB_INT8ARRAY:
case PDB_FLOATARRAY:
case PDB_STRINGARRAY:
params[i].value.pdb_pointer = va_arg (args, gpointer);
break;
case PDB_COLOR:
params[i].value.pdb_pointer = va_arg (args, void *);
params[i].value.pdb_color = (GimpRGB) va_arg (args, GimpRGB);
break;
case PDB_REGION:
break;
@ -284,13 +286,13 @@ procedural_db_run_proc (gchar *name,
case PDB_SELECTION:
case PDB_BOUNDARY:
case PDB_PATH:
params[i].value.pdb_int = (gint32) va_arg (args, int);
params[i].value.pdb_int = (gint32) va_arg (args, gint);
break;
case PDB_PARASITE:
params[i].value.pdb_pointer = va_arg (args, void *);
params[i].value.pdb_pointer = va_arg (args, gpointer);
break;
case PDB_STATUS:
params[i].value.pdb_int = (gint32) va_arg (args, int);
params[i].value.pdb_int = (gint32) va_arg (args, gint);
break;
case PDB_END:
break;

View File

@ -22,13 +22,14 @@
struct _Argument
{
PDBArgType arg_type; /* argument type */
PDBArgType arg_type; /* argument type */
union _ArgValue
{
gint32 pdb_int; /* Integer type */
gint32 pdb_int; /* Integer type */
gdouble pdb_float; /* Floating point type */
gpointer pdb_pointer; /* Pointer type */
gpointer pdb_pointer; /* Pointer type */
GimpRGB pdb_color; /* Color type */
} value;
};

View File

@ -60,7 +60,7 @@ void register_tools_procs (void);
void register_undo_procs (void);
void register_unit_procs (void);
/* 323 procedures registered total */
/* 322 procedures registered total */
void
internal_procs_init (void)
@ -74,85 +74,85 @@ internal_procs_init (void)
app_init_update_status (NULL, _("Channel"), 0.043);
register_channel_procs ();
app_init_update_status (NULL, _("Channel Ops"), 0.09);
app_init_update_status (NULL, _("Channel Ops"), 0.087);
register_channel_ops_procs ();
app_init_update_status (NULL, _("Color"), 0.096);
app_init_update_status (NULL, _("Color"), 0.093);
register_color_procs ();
app_init_update_status (NULL, _("Convert"), 0.133);
app_init_update_status (NULL, _("Convert"), 0.13);
register_convert_procs ();
app_init_update_status (NULL, _("GDisplay procedures"), 0.142);
app_init_update_status (NULL, _("GDisplay procedures"), 0.14);
register_display_procs ();
app_init_update_status (NULL, _("Drawable procedures"), 0.152);
app_init_update_status (NULL, _("Drawable procedures"), 0.149);
register_drawable_procs ();
app_init_update_status (NULL, _("Edit procedures"), 0.22);
app_init_update_status (NULL, _("Edit procedures"), 0.217);
register_edit_procs ();
app_init_update_status (NULL, _("File Operations"), 0.238);
app_init_update_status (NULL, _("File Operations"), 0.236);
register_fileops_procs ();
app_init_update_status (NULL, _("Floating selections"), 0.263);
app_init_update_status (NULL, _("Floating selections"), 0.261);
register_floating_sel_procs ();
app_init_update_status (NULL, _("Gimprc procedures"), 0.282);
app_init_update_status (NULL, _("Gimprc procedures"), 0.28);
register_gimprc_procs ();
app_init_update_status (NULL, _("Gradients"), 0.291);
app_init_update_status (NULL, _("Gradients"), 0.289);
register_gradients_procs ();
app_init_update_status (NULL, _("Gradient UI"), 0.307);
app_init_update_status (NULL, _("Gradient UI"), 0.304);
register_gradient_select_procs ();
app_init_update_status (NULL, _("Guide procedures"), 0.319);
app_init_update_status (NULL, _("Guide procedures"), 0.317);
register_guides_procs ();
app_init_update_status (NULL, _("Help procedures"), 0.337);
app_init_update_status (NULL, _("Help procedures"), 0.335);
register_help_procs ();
app_init_update_status (NULL, _("Image"), 0.341);
app_init_update_status (NULL, _("Image"), 0.339);
register_image_procs ();
app_init_update_status (NULL, _("Layer"), 0.523);
app_init_update_status (NULL, _("Layer"), 0.522);
register_layer_procs ();
app_init_update_status (NULL, _("Interface"), 0.619);
app_init_update_status (NULL, _("Interface"), 0.618);
register_message_procs ();
app_init_update_status (NULL, _("Miscellaneous"), 0.628);
app_init_update_status (NULL, _("Miscellaneous"), 0.627);
register_misc_procs ();
app_init_update_status (NULL, _("Palette"), 0.635);
app_init_update_status (NULL, _("Palette"), 0.634);
register_palette_procs ();
app_init_update_status (NULL, _("Parasite procedures"), 0.656);
app_init_update_status (NULL, _("Parasite procedures"), 0.655);
register_parasite_procs ();
app_init_update_status (NULL, _("Paths"), 0.693);
register_paths_procs ();
app_init_update_status (NULL, _("Pattern UI"), 0.734);
app_init_update_status (NULL, _("Pattern UI"), 0.733);
register_pattern_select_procs ();
app_init_update_status (NULL, _("Patterns"), 0.743);
app_init_update_status (NULL, _("Patterns"), 0.742);
register_patterns_procs ();
app_init_update_status (NULL, _("Plug-in"), 0.755);
register_plug_in_procs ();
app_init_update_status (NULL, _("Procedural database"), 0.774);
app_init_update_status (NULL, _("Procedural database"), 0.773);
register_procedural_db_procs ();
app_init_update_status (NULL, _("Image mask"), 0.799);
app_init_update_status (NULL, _("Image mask"), 0.798);
register_selection_procs ();
app_init_update_status (NULL, _("Text procedures"), 0.851);
register_text_tool_procs ();
app_init_update_status (NULL, _("Tool procedures"), 0.864);
app_init_update_status (NULL, _("Tool procedures"), 0.863);
register_tools_procs ();
app_init_update_status (NULL, _("Undo"), 0.957);

View File

@ -56,20 +56,13 @@ static Argument *
palette_get_foreground_invoker (Argument *args)
{
Argument *return_args;
guchar *col;
GimpRGB color;
GimpRGB *color;
gimp_context_get_foreground (NULL, &color);
col = (guchar *) g_new (guchar, 3);
gimp_rgb_get_uchar (&color,
&col[RED_PIX],
&col[GREEN_PIX],
&col[BLUE_PIX]);
color = g_new (GimpRGB, 1);
gimp_context_get_foreground (NULL, color);
return_args = procedural_db_return_args (&palette_get_foreground_proc, TRUE);
return_args[1].value.pdb_pointer = col;
return_args[1].value.pdb_pointer = color;
return return_args;
}
@ -103,20 +96,13 @@ static Argument *
palette_get_background_invoker (Argument *args)
{
Argument *return_args;
guchar *col;
GimpRGB color;
GimpRGB *color;
gimp_context_get_background (NULL, &color);
col = (guchar *) g_new (guchar, 3);
gimp_rgb_get_uchar (&color,
&col[RED_PIX],
&col[GREEN_PIX],
&col[BLUE_PIX]);
color = g_new (GimpRGB, 1);
gimp_context_get_background (NULL, color);
return_args = procedural_db_return_args (&palette_get_background_proc, TRUE);
return_args[1].value.pdb_pointer = col;
return_args[1].value.pdb_pointer = color;
return return_args;
}
@ -149,18 +135,14 @@ static ProcRecord palette_get_background_proc =
static Argument *
palette_set_foreground_invoker (Argument *args)
{
guchar *col;
GimpRGB color;
GimpRGB *color;
GimpRGB rgb_color;
col = (guchar *) args[0].value.pdb_pointer;
color = (GimpRGB *) args[0].value.pdb_pointer;
gimp_rgba_set_uchar (&color,
col[RED_PIX],
col[GREEN_PIX],
col[BLUE_PIX],
255);
gimp_context_set_foreground (NULL, &color);
rgb_color = *color;
rgb_color.a = 1.0;
gimp_context_set_foreground (NULL, &rgb_color);
return procedural_db_return_args (&palette_set_foreground_proc, TRUE);
}
@ -193,18 +175,14 @@ static ProcRecord palette_set_foreground_proc =
static Argument *
palette_set_background_invoker (Argument *args)
{
guchar *col;
GimpRGB color;
GimpRGB *color;
GimpRGB rgb_color;
col = (guchar *) args[0].value.pdb_pointer;
color = (GimpRGB *) args[0].value.pdb_pointer;
gimp_rgba_set_uchar (&color,
col[RED_PIX],
col[GREEN_PIX],
col[BLUE_PIX],
255);
gimp_context_set_background (NULL, &color);
rgb_color = *color;
rgb_color.a = 1.0;
gimp_context_set_background (NULL, &rgb_color);
return procedural_db_return_args (&palette_set_background_proc, TRUE);
}

View File

@ -261,10 +261,10 @@ procedural_db_run_proc (gchar *name,
case PDB_INT16:
case PDB_INT8:
case PDB_DISPLAY:
params[i].value.pdb_int = (gint32) va_arg (args, int);
params[i].value.pdb_int = (gint32) va_arg (args, gint);
break;
case PDB_FLOAT:
params[i].value.pdb_float = (gdouble) va_arg (args, double);
params[i].value.pdb_float = (gdouble) va_arg (args, gdouble);
break;
case PDB_STRING:
case PDB_INT32ARRAY:
@ -272,8 +272,10 @@ procedural_db_run_proc (gchar *name,
case PDB_INT8ARRAY:
case PDB_FLOATARRAY:
case PDB_STRINGARRAY:
params[i].value.pdb_pointer = va_arg (args, gpointer);
break;
case PDB_COLOR:
params[i].value.pdb_pointer = va_arg (args, void *);
params[i].value.pdb_color = (GimpRGB) va_arg (args, GimpRGB);
break;
case PDB_REGION:
break;
@ -284,13 +286,13 @@ procedural_db_run_proc (gchar *name,
case PDB_SELECTION:
case PDB_BOUNDARY:
case PDB_PATH:
params[i].value.pdb_int = (gint32) va_arg (args, int);
params[i].value.pdb_int = (gint32) va_arg (args, gint);
break;
case PDB_PARASITE:
params[i].value.pdb_pointer = va_arg (args, void *);
params[i].value.pdb_pointer = va_arg (args, gpointer);
break;
case PDB_STATUS:
params[i].value.pdb_int = (gint32) va_arg (args, int);
params[i].value.pdb_int = (gint32) va_arg (args, gint);
break;
case PDB_END:
break;

View File

@ -22,13 +22,14 @@
struct _Argument
{
PDBArgType arg_type; /* argument type */
PDBArgType arg_type; /* argument type */
union _ArgValue
{
gint32 pdb_int; /* Integer type */
gint32 pdb_int; /* Integer type */
gdouble pdb_float; /* Floating point type */
gpointer pdb_pointer; /* Pointer type */
gpointer pdb_pointer; /* Pointer type */
GimpRGB pdb_color; /* Color type */
} value;
};

View File

@ -54,6 +54,7 @@
#include "tools/transform_core.h"
#include "undo.h"
#include "libgimpcolor/gimpcolor.h"
#include "libgimpmath/gimpmath.h"
static ProcRecord airbrush_proc;
@ -536,7 +537,7 @@ by_color_select_invoker (Argument *args)
{
gboolean success = TRUE;
GimpDrawable *drawable;
guchar *color;
GimpRGB *color;
gint32 threshold;
gint32 operation;
gboolean antialias;
@ -544,12 +545,13 @@ by_color_select_invoker (Argument *args)
gdouble feather_radius;
gboolean sample_merged;
GimpImage *gimage;
guchar fixme[3];
drawable = gimp_drawable_get_by_ID (args[0].value.pdb_int);
if (drawable == NULL)
success = FALSE;
color = (guchar *) args[1].value.pdb_pointer;
color = (GimpRGB *) args[1].value.pdb_pointer;
threshold = args[2].value.pdb_int;
if (threshold < 0 || threshold > 255)
@ -570,7 +572,8 @@ by_color_select_invoker (Argument *args)
if (success)
{
gimage = gimp_drawable_gimage (GIMP_DRAWABLE (drawable));
by_color_select (gimage, drawable, color, threshold, operation,
gimp_rgb_get_uchar (&color, fixme, fixme + 1, fixme + 2);
by_color_select (gimage, drawable, fixme, threshold, operation,
antialias, feather, feather_radius, sample_merged);
}
@ -809,7 +812,7 @@ color_picker_invoker (Argument *args)
gboolean sample_average;
gdouble average_radius;
gboolean save_color;
guchar *color = NULL;
GimpRGB *color = NULL;
gimage = pdb_id_to_image (args[0].value.pdb_int);
if (gimage == NULL)
@ -843,10 +846,12 @@ color_picker_invoker (Argument *args)
save_color);
if (success)
{
color = g_new (guchar, 3);
color[RED_PIX] = col_value[RED_PIX];
color[GREEN_PIX] = col_value[GREEN_PIX];
color[BLUE_PIX] = col_value[BLUE_PIX];
color = g_new (GimpRGB, 1);
gimp_rgba_set_uchar (color,
col_value[RED_PIX],
col_value[GREEN_PIX],
col_value[BLUE_PIX],
col_value[ALPHA_PIX]);
}
}

View File

@ -2447,12 +2447,16 @@ plug_in_add_to_db (void)
if (proc_def->image_types)
{
return_vals = procedural_db_execute ("gimp_register_save_handler", args);
return_vals =
procedural_db_execute ("gimp_register_save_handler",
args);
g_free (return_vals);
}
else
{
return_vals = procedural_db_execute ("gimp_register_magic_load_handler", args);
return_vals =
procedural_db_execute ("gimp_register_magic_load_handler",
args);
g_free (return_vals);
}
}
@ -2904,9 +2908,8 @@ plug_in_params_to_args (GPParam *params,
{
Argument *args;
gchar **stringarray;
guchar *colorarray;
gint count;
gint i, j;
gint count;
gint i, j;
if (nparams == 0)
return NULL;
@ -2942,7 +2945,8 @@ plug_in_params_to_args (GPParam *params,
{
count = args[i-1].value.pdb_int;
args[i].value.pdb_pointer = g_new (gint32, count);
memcpy (args[i].value.pdb_pointer, params[i].data.d_int32array, count * 4);
memcpy (args[i].value.pdb_pointer,
params[i].data.d_int32array, count * 4);
}
else
{
@ -2954,7 +2958,8 @@ plug_in_params_to_args (GPParam *params,
{
count = args[i-1].value.pdb_int;
args[i].value.pdb_pointer = g_new (gint16, count);
memcpy (args[i].value.pdb_pointer, params[i].data.d_int16array, count * 2);
memcpy (args[i].value.pdb_pointer,
params[i].data.d_int16array, count * 2);
}
else
{
@ -2966,7 +2971,8 @@ plug_in_params_to_args (GPParam *params,
{
count = args[i-1].value.pdb_int;
args[i].value.pdb_pointer = g_new (gint8, count);
memcpy (args[i].value.pdb_pointer, params[i].data.d_int8array, count);
memcpy (args[i].value.pdb_pointer,
params[i].data.d_int8array, count);
}
else
{
@ -2978,7 +2984,8 @@ plug_in_params_to_args (GPParam *params,
{
count = args[i-1].value.pdb_int;
args[i].value.pdb_pointer = g_new (gdouble, count);
memcpy (args[i].value.pdb_pointer, params[i].data.d_floatarray, count * 8);
memcpy (args[i].value.pdb_pointer,
params[i].data.d_floatarray, count * 8);
}
else
{
@ -2988,7 +2995,8 @@ plug_in_params_to_args (GPParam *params,
case PDB_STRINGARRAY:
if (full_copy)
{
args[i].value.pdb_pointer = g_new (gchar*, args[i-1].value.pdb_int);
args[i].value.pdb_pointer = g_new (gchar *,
args[i-1].value.pdb_int);
stringarray = args[i].value.pdb_pointer;
for (j = 0; j < args[i-1].value.pdb_int; j++)
@ -3000,11 +3008,7 @@ plug_in_params_to_args (GPParam *params,
}
break;
case PDB_COLOR:
args[i].value.pdb_pointer = g_new (guchar, 3);
colorarray = args[i].value.pdb_pointer;
colorarray[0] = params[i].data.d_color.red;
colorarray[1] = params[i].data.d_color.green;
colorarray[2] = params[i].data.d_color.blue;
args[i].value.pdb_color = params[i].data.d_color;
break;
case PDB_REGION:
g_message ("the \"region\" arg type is not currently supported");
@ -3038,7 +3042,7 @@ plug_in_params_to_args (GPParam *params,
args[i].value.pdb_pointer =
gimp_parasite_copy ((GimpParasite *) &(params[i].data.d_parasite));
else
args[i].value.pdb_pointer = (void *)&(params[i].data.d_parasite);
args[i].value.pdb_pointer = (gpointer) &(params[i].data.d_parasite);
break;
case PDB_STATUS:
args[i].value.pdb_int = params[i].data.d_status;
@ -3058,8 +3062,7 @@ plug_in_args_to_params (Argument *args,
{
GPParam *params;
gchar **stringarray;
guchar *colorarray;
gint i, j;
gint i, j;
if (nargs == 0)
return NULL;
@ -3157,19 +3160,7 @@ plug_in_args_to_params (Argument *args,
}
break;
case PDB_COLOR:
colorarray = args[i].value.pdb_pointer;
if( colorarray )
{
params[i].data.d_color.red = colorarray[0];
params[i].data.d_color.green = colorarray[1];
params[i].data.d_color.blue = colorarray[2];
}
else
{
params[i].data.d_color.red = 0;
params[i].data.d_color.green = 0;
params[i].data.d_color.blue = 0;
}
params[i].data.d_color = args[i].value.pdb_color;
break;
case PDB_REGION:
g_message ("the \"region\" arg type is not currently supported");
@ -3373,7 +3364,6 @@ plug_in_args_destroy (Argument *args,
}
break;
case PDB_COLOR:
g_free (args[i].value.pdb_pointer);
break;
case PDB_REGION:
g_message ("the \"region\" arg type is not currently supported");

View File

@ -2447,12 +2447,16 @@ plug_in_add_to_db (void)
if (proc_def->image_types)
{
return_vals = procedural_db_execute ("gimp_register_save_handler", args);
return_vals =
procedural_db_execute ("gimp_register_save_handler",
args);
g_free (return_vals);
}
else
{
return_vals = procedural_db_execute ("gimp_register_magic_load_handler", args);
return_vals =
procedural_db_execute ("gimp_register_magic_load_handler",
args);
g_free (return_vals);
}
}
@ -2904,9 +2908,8 @@ plug_in_params_to_args (GPParam *params,
{
Argument *args;
gchar **stringarray;
guchar *colorarray;
gint count;
gint i, j;
gint count;
gint i, j;
if (nparams == 0)
return NULL;
@ -2942,7 +2945,8 @@ plug_in_params_to_args (GPParam *params,
{
count = args[i-1].value.pdb_int;
args[i].value.pdb_pointer = g_new (gint32, count);
memcpy (args[i].value.pdb_pointer, params[i].data.d_int32array, count * 4);
memcpy (args[i].value.pdb_pointer,
params[i].data.d_int32array, count * 4);
}
else
{
@ -2954,7 +2958,8 @@ plug_in_params_to_args (GPParam *params,
{
count = args[i-1].value.pdb_int;
args[i].value.pdb_pointer = g_new (gint16, count);
memcpy (args[i].value.pdb_pointer, params[i].data.d_int16array, count * 2);
memcpy (args[i].value.pdb_pointer,
params[i].data.d_int16array, count * 2);
}
else
{
@ -2966,7 +2971,8 @@ plug_in_params_to_args (GPParam *params,
{
count = args[i-1].value.pdb_int;
args[i].value.pdb_pointer = g_new (gint8, count);
memcpy (args[i].value.pdb_pointer, params[i].data.d_int8array, count);
memcpy (args[i].value.pdb_pointer,
params[i].data.d_int8array, count);
}
else
{
@ -2978,7 +2984,8 @@ plug_in_params_to_args (GPParam *params,
{
count = args[i-1].value.pdb_int;
args[i].value.pdb_pointer = g_new (gdouble, count);
memcpy (args[i].value.pdb_pointer, params[i].data.d_floatarray, count * 8);
memcpy (args[i].value.pdb_pointer,
params[i].data.d_floatarray, count * 8);
}
else
{
@ -2988,7 +2995,8 @@ plug_in_params_to_args (GPParam *params,
case PDB_STRINGARRAY:
if (full_copy)
{
args[i].value.pdb_pointer = g_new (gchar*, args[i-1].value.pdb_int);
args[i].value.pdb_pointer = g_new (gchar *,
args[i-1].value.pdb_int);
stringarray = args[i].value.pdb_pointer;
for (j = 0; j < args[i-1].value.pdb_int; j++)
@ -3000,11 +3008,7 @@ plug_in_params_to_args (GPParam *params,
}
break;
case PDB_COLOR:
args[i].value.pdb_pointer = g_new (guchar, 3);
colorarray = args[i].value.pdb_pointer;
colorarray[0] = params[i].data.d_color.red;
colorarray[1] = params[i].data.d_color.green;
colorarray[2] = params[i].data.d_color.blue;
args[i].value.pdb_color = params[i].data.d_color;
break;
case PDB_REGION:
g_message ("the \"region\" arg type is not currently supported");
@ -3038,7 +3042,7 @@ plug_in_params_to_args (GPParam *params,
args[i].value.pdb_pointer =
gimp_parasite_copy ((GimpParasite *) &(params[i].data.d_parasite));
else
args[i].value.pdb_pointer = (void *)&(params[i].data.d_parasite);
args[i].value.pdb_pointer = (gpointer) &(params[i].data.d_parasite);
break;
case PDB_STATUS:
args[i].value.pdb_int = params[i].data.d_status;
@ -3058,8 +3062,7 @@ plug_in_args_to_params (Argument *args,
{
GPParam *params;
gchar **stringarray;
guchar *colorarray;
gint i, j;
gint i, j;
if (nargs == 0)
return NULL;
@ -3157,19 +3160,7 @@ plug_in_args_to_params (Argument *args,
}
break;
case PDB_COLOR:
colorarray = args[i].value.pdb_pointer;
if( colorarray )
{
params[i].data.d_color.red = colorarray[0];
params[i].data.d_color.green = colorarray[1];
params[i].data.d_color.blue = colorarray[2];
}
else
{
params[i].data.d_color.red = 0;
params[i].data.d_color.green = 0;
params[i].data.d_color.blue = 0;
}
params[i].data.d_color = args[i].value.pdb_color;
break;
case PDB_REGION:
g_message ("the \"region\" arg type is not currently supported");
@ -3373,7 +3364,6 @@ plug_in_args_destroy (Argument *args,
}
break;
case PDB_COLOR:
g_free (args[i].value.pdb_pointer);
break;
case PDB_REGION:
g_message ("the \"region\" arg type is not currently supported");

View File

@ -2447,12 +2447,16 @@ plug_in_add_to_db (void)
if (proc_def->image_types)
{
return_vals = procedural_db_execute ("gimp_register_save_handler", args);
return_vals =
procedural_db_execute ("gimp_register_save_handler",
args);
g_free (return_vals);
}
else
{
return_vals = procedural_db_execute ("gimp_register_magic_load_handler", args);
return_vals =
procedural_db_execute ("gimp_register_magic_load_handler",
args);
g_free (return_vals);
}
}
@ -2904,9 +2908,8 @@ plug_in_params_to_args (GPParam *params,
{
Argument *args;
gchar **stringarray;
guchar *colorarray;
gint count;
gint i, j;
gint count;
gint i, j;
if (nparams == 0)
return NULL;
@ -2942,7 +2945,8 @@ plug_in_params_to_args (GPParam *params,
{
count = args[i-1].value.pdb_int;
args[i].value.pdb_pointer = g_new (gint32, count);
memcpy (args[i].value.pdb_pointer, params[i].data.d_int32array, count * 4);
memcpy (args[i].value.pdb_pointer,
params[i].data.d_int32array, count * 4);
}
else
{
@ -2954,7 +2958,8 @@ plug_in_params_to_args (GPParam *params,
{
count = args[i-1].value.pdb_int;
args[i].value.pdb_pointer = g_new (gint16, count);
memcpy (args[i].value.pdb_pointer, params[i].data.d_int16array, count * 2);
memcpy (args[i].value.pdb_pointer,
params[i].data.d_int16array, count * 2);
}
else
{
@ -2966,7 +2971,8 @@ plug_in_params_to_args (GPParam *params,
{
count = args[i-1].value.pdb_int;
args[i].value.pdb_pointer = g_new (gint8, count);
memcpy (args[i].value.pdb_pointer, params[i].data.d_int8array, count);
memcpy (args[i].value.pdb_pointer,
params[i].data.d_int8array, count);
}
else
{
@ -2978,7 +2984,8 @@ plug_in_params_to_args (GPParam *params,
{
count = args[i-1].value.pdb_int;
args[i].value.pdb_pointer = g_new (gdouble, count);
memcpy (args[i].value.pdb_pointer, params[i].data.d_floatarray, count * 8);
memcpy (args[i].value.pdb_pointer,
params[i].data.d_floatarray, count * 8);
}
else
{
@ -2988,7 +2995,8 @@ plug_in_params_to_args (GPParam *params,
case PDB_STRINGARRAY:
if (full_copy)
{
args[i].value.pdb_pointer = g_new (gchar*, args[i-1].value.pdb_int);
args[i].value.pdb_pointer = g_new (gchar *,
args[i-1].value.pdb_int);
stringarray = args[i].value.pdb_pointer;
for (j = 0; j < args[i-1].value.pdb_int; j++)
@ -3000,11 +3008,7 @@ plug_in_params_to_args (GPParam *params,
}
break;
case PDB_COLOR:
args[i].value.pdb_pointer = g_new (guchar, 3);
colorarray = args[i].value.pdb_pointer;
colorarray[0] = params[i].data.d_color.red;
colorarray[1] = params[i].data.d_color.green;
colorarray[2] = params[i].data.d_color.blue;
args[i].value.pdb_color = params[i].data.d_color;
break;
case PDB_REGION:
g_message ("the \"region\" arg type is not currently supported");
@ -3038,7 +3042,7 @@ plug_in_params_to_args (GPParam *params,
args[i].value.pdb_pointer =
gimp_parasite_copy ((GimpParasite *) &(params[i].data.d_parasite));
else
args[i].value.pdb_pointer = (void *)&(params[i].data.d_parasite);
args[i].value.pdb_pointer = (gpointer) &(params[i].data.d_parasite);
break;
case PDB_STATUS:
args[i].value.pdb_int = params[i].data.d_status;
@ -3058,8 +3062,7 @@ plug_in_args_to_params (Argument *args,
{
GPParam *params;
gchar **stringarray;
guchar *colorarray;
gint i, j;
gint i, j;
if (nargs == 0)
return NULL;
@ -3157,19 +3160,7 @@ plug_in_args_to_params (Argument *args,
}
break;
case PDB_COLOR:
colorarray = args[i].value.pdb_pointer;
if( colorarray )
{
params[i].data.d_color.red = colorarray[0];
params[i].data.d_color.green = colorarray[1];
params[i].data.d_color.blue = colorarray[2];
}
else
{
params[i].data.d_color.red = 0;
params[i].data.d_color.green = 0;
params[i].data.d_color.blue = 0;
}
params[i].data.d_color = args[i].value.pdb_color;
break;
case PDB_REGION:
g_message ("the \"region\" arg type is not currently supported");
@ -3373,7 +3364,6 @@ plug_in_args_destroy (Argument *args,
}
break;
case PDB_COLOR:
g_free (args[i].value.pdb_pointer);
break;
case PDB_REGION:
g_message ("the \"region\" arg type is not currently supported");

View File

@ -2447,12 +2447,16 @@ plug_in_add_to_db (void)
if (proc_def->image_types)
{
return_vals = procedural_db_execute ("gimp_register_save_handler", args);
return_vals =
procedural_db_execute ("gimp_register_save_handler",
args);
g_free (return_vals);
}
else
{
return_vals = procedural_db_execute ("gimp_register_magic_load_handler", args);
return_vals =
procedural_db_execute ("gimp_register_magic_load_handler",
args);
g_free (return_vals);
}
}
@ -2904,9 +2908,8 @@ plug_in_params_to_args (GPParam *params,
{
Argument *args;
gchar **stringarray;
guchar *colorarray;
gint count;
gint i, j;
gint count;
gint i, j;
if (nparams == 0)
return NULL;
@ -2942,7 +2945,8 @@ plug_in_params_to_args (GPParam *params,
{
count = args[i-1].value.pdb_int;
args[i].value.pdb_pointer = g_new (gint32, count);
memcpy (args[i].value.pdb_pointer, params[i].data.d_int32array, count * 4);
memcpy (args[i].value.pdb_pointer,
params[i].data.d_int32array, count * 4);
}
else
{
@ -2954,7 +2958,8 @@ plug_in_params_to_args (GPParam *params,
{
count = args[i-1].value.pdb_int;
args[i].value.pdb_pointer = g_new (gint16, count);
memcpy (args[i].value.pdb_pointer, params[i].data.d_int16array, count * 2);
memcpy (args[i].value.pdb_pointer,
params[i].data.d_int16array, count * 2);
}
else
{
@ -2966,7 +2971,8 @@ plug_in_params_to_args (GPParam *params,
{
count = args[i-1].value.pdb_int;
args[i].value.pdb_pointer = g_new (gint8, count);
memcpy (args[i].value.pdb_pointer, params[i].data.d_int8array, count);
memcpy (args[i].value.pdb_pointer,
params[i].data.d_int8array, count);
}
else
{
@ -2978,7 +2984,8 @@ plug_in_params_to_args (GPParam *params,
{
count = args[i-1].value.pdb_int;
args[i].value.pdb_pointer = g_new (gdouble, count);
memcpy (args[i].value.pdb_pointer, params[i].data.d_floatarray, count * 8);
memcpy (args[i].value.pdb_pointer,
params[i].data.d_floatarray, count * 8);
}
else
{
@ -2988,7 +2995,8 @@ plug_in_params_to_args (GPParam *params,
case PDB_STRINGARRAY:
if (full_copy)
{
args[i].value.pdb_pointer = g_new (gchar*, args[i-1].value.pdb_int);
args[i].value.pdb_pointer = g_new (gchar *,
args[i-1].value.pdb_int);
stringarray = args[i].value.pdb_pointer;
for (j = 0; j < args[i-1].value.pdb_int; j++)
@ -3000,11 +3008,7 @@ plug_in_params_to_args (GPParam *params,
}
break;
case PDB_COLOR:
args[i].value.pdb_pointer = g_new (guchar, 3);
colorarray = args[i].value.pdb_pointer;
colorarray[0] = params[i].data.d_color.red;
colorarray[1] = params[i].data.d_color.green;
colorarray[2] = params[i].data.d_color.blue;
args[i].value.pdb_color = params[i].data.d_color;
break;
case PDB_REGION:
g_message ("the \"region\" arg type is not currently supported");
@ -3038,7 +3042,7 @@ plug_in_params_to_args (GPParam *params,
args[i].value.pdb_pointer =
gimp_parasite_copy ((GimpParasite *) &(params[i].data.d_parasite));
else
args[i].value.pdb_pointer = (void *)&(params[i].data.d_parasite);
args[i].value.pdb_pointer = (gpointer) &(params[i].data.d_parasite);
break;
case PDB_STATUS:
args[i].value.pdb_int = params[i].data.d_status;
@ -3058,8 +3062,7 @@ plug_in_args_to_params (Argument *args,
{
GPParam *params;
gchar **stringarray;
guchar *colorarray;
gint i, j;
gint i, j;
if (nargs == 0)
return NULL;
@ -3157,19 +3160,7 @@ plug_in_args_to_params (Argument *args,
}
break;
case PDB_COLOR:
colorarray = args[i].value.pdb_pointer;
if( colorarray )
{
params[i].data.d_color.red = colorarray[0];
params[i].data.d_color.green = colorarray[1];
params[i].data.d_color.blue = colorarray[2];
}
else
{
params[i].data.d_color.red = 0;
params[i].data.d_color.green = 0;
params[i].data.d_color.blue = 0;
}
params[i].data.d_color = args[i].value.pdb_color;
break;
case PDB_REGION:
g_message ("the \"region\" arg type is not currently supported");
@ -3373,7 +3364,6 @@ plug_in_args_destroy (Argument *args,
}
break;
case PDB_COLOR:
g_free (args[i].value.pdb_pointer);
break;
case PDB_REGION:
g_message ("the \"region\" arg type is not currently supported");

View File

@ -2447,12 +2447,16 @@ plug_in_add_to_db (void)
if (proc_def->image_types)
{
return_vals = procedural_db_execute ("gimp_register_save_handler", args);
return_vals =
procedural_db_execute ("gimp_register_save_handler",
args);
g_free (return_vals);
}
else
{
return_vals = procedural_db_execute ("gimp_register_magic_load_handler", args);
return_vals =
procedural_db_execute ("gimp_register_magic_load_handler",
args);
g_free (return_vals);
}
}
@ -2904,9 +2908,8 @@ plug_in_params_to_args (GPParam *params,
{
Argument *args;
gchar **stringarray;
guchar *colorarray;
gint count;
gint i, j;
gint count;
gint i, j;
if (nparams == 0)
return NULL;
@ -2942,7 +2945,8 @@ plug_in_params_to_args (GPParam *params,
{
count = args[i-1].value.pdb_int;
args[i].value.pdb_pointer = g_new (gint32, count);
memcpy (args[i].value.pdb_pointer, params[i].data.d_int32array, count * 4);
memcpy (args[i].value.pdb_pointer,
params[i].data.d_int32array, count * 4);
}
else
{
@ -2954,7 +2958,8 @@ plug_in_params_to_args (GPParam *params,
{
count = args[i-1].value.pdb_int;
args[i].value.pdb_pointer = g_new (gint16, count);
memcpy (args[i].value.pdb_pointer, params[i].data.d_int16array, count * 2);
memcpy (args[i].value.pdb_pointer,
params[i].data.d_int16array, count * 2);
}
else
{
@ -2966,7 +2971,8 @@ plug_in_params_to_args (GPParam *params,
{
count = args[i-1].value.pdb_int;
args[i].value.pdb_pointer = g_new (gint8, count);
memcpy (args[i].value.pdb_pointer, params[i].data.d_int8array, count);
memcpy (args[i].value.pdb_pointer,
params[i].data.d_int8array, count);
}
else
{
@ -2978,7 +2984,8 @@ plug_in_params_to_args (GPParam *params,
{
count = args[i-1].value.pdb_int;
args[i].value.pdb_pointer = g_new (gdouble, count);
memcpy (args[i].value.pdb_pointer, params[i].data.d_floatarray, count * 8);
memcpy (args[i].value.pdb_pointer,
params[i].data.d_floatarray, count * 8);
}
else
{
@ -2988,7 +2995,8 @@ plug_in_params_to_args (GPParam *params,
case PDB_STRINGARRAY:
if (full_copy)
{
args[i].value.pdb_pointer = g_new (gchar*, args[i-1].value.pdb_int);
args[i].value.pdb_pointer = g_new (gchar *,
args[i-1].value.pdb_int);
stringarray = args[i].value.pdb_pointer;
for (j = 0; j < args[i-1].value.pdb_int; j++)
@ -3000,11 +3008,7 @@ plug_in_params_to_args (GPParam *params,
}
break;
case PDB_COLOR:
args[i].value.pdb_pointer = g_new (guchar, 3);
colorarray = args[i].value.pdb_pointer;
colorarray[0] = params[i].data.d_color.red;
colorarray[1] = params[i].data.d_color.green;
colorarray[2] = params[i].data.d_color.blue;
args[i].value.pdb_color = params[i].data.d_color;
break;
case PDB_REGION:
g_message ("the \"region\" arg type is not currently supported");
@ -3038,7 +3042,7 @@ plug_in_params_to_args (GPParam *params,
args[i].value.pdb_pointer =
gimp_parasite_copy ((GimpParasite *) &(params[i].data.d_parasite));
else
args[i].value.pdb_pointer = (void *)&(params[i].data.d_parasite);
args[i].value.pdb_pointer = (gpointer) &(params[i].data.d_parasite);
break;
case PDB_STATUS:
args[i].value.pdb_int = params[i].data.d_status;
@ -3058,8 +3062,7 @@ plug_in_args_to_params (Argument *args,
{
GPParam *params;
gchar **stringarray;
guchar *colorarray;
gint i, j;
gint i, j;
if (nargs == 0)
return NULL;
@ -3157,19 +3160,7 @@ plug_in_args_to_params (Argument *args,
}
break;
case PDB_COLOR:
colorarray = args[i].value.pdb_pointer;
if( colorarray )
{
params[i].data.d_color.red = colorarray[0];
params[i].data.d_color.green = colorarray[1];
params[i].data.d_color.blue = colorarray[2];
}
else
{
params[i].data.d_color.red = 0;
params[i].data.d_color.green = 0;
params[i].data.d_color.blue = 0;
}
params[i].data.d_color = args[i].value.pdb_color;
break;
case PDB_REGION:
g_message ("the \"region\" arg type is not currently supported");
@ -3373,7 +3364,6 @@ plug_in_args_destroy (Argument *args,
}
break;
case PDB_COLOR:
g_free (args[i].value.pdb_pointer);
break;
case PDB_REGION:
g_message ("the \"region\" arg type is not currently supported");

View File

@ -2447,12 +2447,16 @@ plug_in_add_to_db (void)
if (proc_def->image_types)
{
return_vals = procedural_db_execute ("gimp_register_save_handler", args);
return_vals =
procedural_db_execute ("gimp_register_save_handler",
args);
g_free (return_vals);
}
else
{
return_vals = procedural_db_execute ("gimp_register_magic_load_handler", args);
return_vals =
procedural_db_execute ("gimp_register_magic_load_handler",
args);
g_free (return_vals);
}
}
@ -2904,9 +2908,8 @@ plug_in_params_to_args (GPParam *params,
{
Argument *args;
gchar **stringarray;
guchar *colorarray;
gint count;
gint i, j;
gint count;
gint i, j;
if (nparams == 0)
return NULL;
@ -2942,7 +2945,8 @@ plug_in_params_to_args (GPParam *params,
{
count = args[i-1].value.pdb_int;
args[i].value.pdb_pointer = g_new (gint32, count);
memcpy (args[i].value.pdb_pointer, params[i].data.d_int32array, count * 4);
memcpy (args[i].value.pdb_pointer,
params[i].data.d_int32array, count * 4);
}
else
{
@ -2954,7 +2958,8 @@ plug_in_params_to_args (GPParam *params,
{
count = args[i-1].value.pdb_int;
args[i].value.pdb_pointer = g_new (gint16, count);
memcpy (args[i].value.pdb_pointer, params[i].data.d_int16array, count * 2);
memcpy (args[i].value.pdb_pointer,
params[i].data.d_int16array, count * 2);
}
else
{
@ -2966,7 +2971,8 @@ plug_in_params_to_args (GPParam *params,
{
count = args[i-1].value.pdb_int;
args[i].value.pdb_pointer = g_new (gint8, count);
memcpy (args[i].value.pdb_pointer, params[i].data.d_int8array, count);
memcpy (args[i].value.pdb_pointer,
params[i].data.d_int8array, count);
}
else
{
@ -2978,7 +2984,8 @@ plug_in_params_to_args (GPParam *params,
{
count = args[i-1].value.pdb_int;
args[i].value.pdb_pointer = g_new (gdouble, count);
memcpy (args[i].value.pdb_pointer, params[i].data.d_floatarray, count * 8);
memcpy (args[i].value.pdb_pointer,
params[i].data.d_floatarray, count * 8);
}
else
{
@ -2988,7 +2995,8 @@ plug_in_params_to_args (GPParam *params,
case PDB_STRINGARRAY:
if (full_copy)
{
args[i].value.pdb_pointer = g_new (gchar*, args[i-1].value.pdb_int);
args[i].value.pdb_pointer = g_new (gchar *,
args[i-1].value.pdb_int);
stringarray = args[i].value.pdb_pointer;
for (j = 0; j < args[i-1].value.pdb_int; j++)
@ -3000,11 +3008,7 @@ plug_in_params_to_args (GPParam *params,
}
break;
case PDB_COLOR:
args[i].value.pdb_pointer = g_new (guchar, 3);
colorarray = args[i].value.pdb_pointer;
colorarray[0] = params[i].data.d_color.red;
colorarray[1] = params[i].data.d_color.green;
colorarray[2] = params[i].data.d_color.blue;
args[i].value.pdb_color = params[i].data.d_color;
break;
case PDB_REGION:
g_message ("the \"region\" arg type is not currently supported");
@ -3038,7 +3042,7 @@ plug_in_params_to_args (GPParam *params,
args[i].value.pdb_pointer =
gimp_parasite_copy ((GimpParasite *) &(params[i].data.d_parasite));
else
args[i].value.pdb_pointer = (void *)&(params[i].data.d_parasite);
args[i].value.pdb_pointer = (gpointer) &(params[i].data.d_parasite);
break;
case PDB_STATUS:
args[i].value.pdb_int = params[i].data.d_status;
@ -3058,8 +3062,7 @@ plug_in_args_to_params (Argument *args,
{
GPParam *params;
gchar **stringarray;
guchar *colorarray;
gint i, j;
gint i, j;
if (nargs == 0)
return NULL;
@ -3157,19 +3160,7 @@ plug_in_args_to_params (Argument *args,
}
break;
case PDB_COLOR:
colorarray = args[i].value.pdb_pointer;
if( colorarray )
{
params[i].data.d_color.red = colorarray[0];
params[i].data.d_color.green = colorarray[1];
params[i].data.d_color.blue = colorarray[2];
}
else
{
params[i].data.d_color.red = 0;
params[i].data.d_color.green = 0;
params[i].data.d_color.blue = 0;
}
params[i].data.d_color = args[i].value.pdb_color;
break;
case PDB_REGION:
g_message ("the \"region\" arg type is not currently supported");
@ -3373,7 +3364,6 @@ plug_in_args_destroy (Argument *args,
}
break;
case PDB_COLOR:
g_free (args[i].value.pdb_pointer);
break;
case PDB_REGION:
g_message ("the \"region\" arg type is not currently supported");

View File

@ -2447,12 +2447,16 @@ plug_in_add_to_db (void)
if (proc_def->image_types)
{
return_vals = procedural_db_execute ("gimp_register_save_handler", args);
return_vals =
procedural_db_execute ("gimp_register_save_handler",
args);
g_free (return_vals);
}
else
{
return_vals = procedural_db_execute ("gimp_register_magic_load_handler", args);
return_vals =
procedural_db_execute ("gimp_register_magic_load_handler",
args);
g_free (return_vals);
}
}
@ -2904,9 +2908,8 @@ plug_in_params_to_args (GPParam *params,
{
Argument *args;
gchar **stringarray;
guchar *colorarray;
gint count;
gint i, j;
gint count;
gint i, j;
if (nparams == 0)
return NULL;
@ -2942,7 +2945,8 @@ plug_in_params_to_args (GPParam *params,
{
count = args[i-1].value.pdb_int;
args[i].value.pdb_pointer = g_new (gint32, count);
memcpy (args[i].value.pdb_pointer, params[i].data.d_int32array, count * 4);
memcpy (args[i].value.pdb_pointer,
params[i].data.d_int32array, count * 4);
}
else
{
@ -2954,7 +2958,8 @@ plug_in_params_to_args (GPParam *params,
{
count = args[i-1].value.pdb_int;
args[i].value.pdb_pointer = g_new (gint16, count);
memcpy (args[i].value.pdb_pointer, params[i].data.d_int16array, count * 2);
memcpy (args[i].value.pdb_pointer,
params[i].data.d_int16array, count * 2);
}
else
{
@ -2966,7 +2971,8 @@ plug_in_params_to_args (GPParam *params,
{
count = args[i-1].value.pdb_int;
args[i].value.pdb_pointer = g_new (gint8, count);
memcpy (args[i].value.pdb_pointer, params[i].data.d_int8array, count);
memcpy (args[i].value.pdb_pointer,
params[i].data.d_int8array, count);
}
else
{
@ -2978,7 +2984,8 @@ plug_in_params_to_args (GPParam *params,
{
count = args[i-1].value.pdb_int;
args[i].value.pdb_pointer = g_new (gdouble, count);
memcpy (args[i].value.pdb_pointer, params[i].data.d_floatarray, count * 8);
memcpy (args[i].value.pdb_pointer,
params[i].data.d_floatarray, count * 8);
}
else
{
@ -2988,7 +2995,8 @@ plug_in_params_to_args (GPParam *params,
case PDB_STRINGARRAY:
if (full_copy)
{
args[i].value.pdb_pointer = g_new (gchar*, args[i-1].value.pdb_int);
args[i].value.pdb_pointer = g_new (gchar *,
args[i-1].value.pdb_int);
stringarray = args[i].value.pdb_pointer;
for (j = 0; j < args[i-1].value.pdb_int; j++)
@ -3000,11 +3008,7 @@ plug_in_params_to_args (GPParam *params,
}
break;
case PDB_COLOR:
args[i].value.pdb_pointer = g_new (guchar, 3);
colorarray = args[i].value.pdb_pointer;
colorarray[0] = params[i].data.d_color.red;
colorarray[1] = params[i].data.d_color.green;
colorarray[2] = params[i].data.d_color.blue;
args[i].value.pdb_color = params[i].data.d_color;
break;
case PDB_REGION:
g_message ("the \"region\" arg type is not currently supported");
@ -3038,7 +3042,7 @@ plug_in_params_to_args (GPParam *params,
args[i].value.pdb_pointer =
gimp_parasite_copy ((GimpParasite *) &(params[i].data.d_parasite));
else
args[i].value.pdb_pointer = (void *)&(params[i].data.d_parasite);
args[i].value.pdb_pointer = (gpointer) &(params[i].data.d_parasite);
break;
case PDB_STATUS:
args[i].value.pdb_int = params[i].data.d_status;
@ -3058,8 +3062,7 @@ plug_in_args_to_params (Argument *args,
{
GPParam *params;
gchar **stringarray;
guchar *colorarray;
gint i, j;
gint i, j;
if (nargs == 0)
return NULL;
@ -3157,19 +3160,7 @@ plug_in_args_to_params (Argument *args,
}
break;
case PDB_COLOR:
colorarray = args[i].value.pdb_pointer;
if( colorarray )
{
params[i].data.d_color.red = colorarray[0];
params[i].data.d_color.green = colorarray[1];
params[i].data.d_color.blue = colorarray[2];
}
else
{
params[i].data.d_color.red = 0;
params[i].data.d_color.green = 0;
params[i].data.d_color.blue = 0;
}
params[i].data.d_color = args[i].value.pdb_color;
break;
case PDB_REGION:
g_message ("the \"region\" arg type is not currently supported");
@ -3373,7 +3364,6 @@ plug_in_args_destroy (Argument *args,
}
break;
case PDB_COLOR:
g_free (args[i].value.pdb_pointer);
break;
case PDB_REGION:
g_message ("the \"region\" arg type is not currently supported");

View File

@ -2447,12 +2447,16 @@ plug_in_add_to_db (void)
if (proc_def->image_types)
{
return_vals = procedural_db_execute ("gimp_register_save_handler", args);
return_vals =
procedural_db_execute ("gimp_register_save_handler",
args);
g_free (return_vals);
}
else
{
return_vals = procedural_db_execute ("gimp_register_magic_load_handler", args);
return_vals =
procedural_db_execute ("gimp_register_magic_load_handler",
args);
g_free (return_vals);
}
}
@ -2904,9 +2908,8 @@ plug_in_params_to_args (GPParam *params,
{
Argument *args;
gchar **stringarray;
guchar *colorarray;
gint count;
gint i, j;
gint count;
gint i, j;
if (nparams == 0)
return NULL;
@ -2942,7 +2945,8 @@ plug_in_params_to_args (GPParam *params,
{
count = args[i-1].value.pdb_int;
args[i].value.pdb_pointer = g_new (gint32, count);
memcpy (args[i].value.pdb_pointer, params[i].data.d_int32array, count * 4);
memcpy (args[i].value.pdb_pointer,
params[i].data.d_int32array, count * 4);
}
else
{
@ -2954,7 +2958,8 @@ plug_in_params_to_args (GPParam *params,
{
count = args[i-1].value.pdb_int;
args[i].value.pdb_pointer = g_new (gint16, count);
memcpy (args[i].value.pdb_pointer, params[i].data.d_int16array, count * 2);
memcpy (args[i].value.pdb_pointer,
params[i].data.d_int16array, count * 2);
}
else
{
@ -2966,7 +2971,8 @@ plug_in_params_to_args (GPParam *params,
{
count = args[i-1].value.pdb_int;
args[i].value.pdb_pointer = g_new (gint8, count);
memcpy (args[i].value.pdb_pointer, params[i].data.d_int8array, count);
memcpy (args[i].value.pdb_pointer,
params[i].data.d_int8array, count);
}
else
{
@ -2978,7 +2984,8 @@ plug_in_params_to_args (GPParam *params,
{
count = args[i-1].value.pdb_int;
args[i].value.pdb_pointer = g_new (gdouble, count);
memcpy (args[i].value.pdb_pointer, params[i].data.d_floatarray, count * 8);
memcpy (args[i].value.pdb_pointer,
params[i].data.d_floatarray, count * 8);
}
else
{
@ -2988,7 +2995,8 @@ plug_in_params_to_args (GPParam *params,
case PDB_STRINGARRAY:
if (full_copy)
{
args[i].value.pdb_pointer = g_new (gchar*, args[i-1].value.pdb_int);
args[i].value.pdb_pointer = g_new (gchar *,
args[i-1].value.pdb_int);
stringarray = args[i].value.pdb_pointer;
for (j = 0; j < args[i-1].value.pdb_int; j++)
@ -3000,11 +3008,7 @@ plug_in_params_to_args (GPParam *params,
}
break;
case PDB_COLOR:
args[i].value.pdb_pointer = g_new (guchar, 3);
colorarray = args[i].value.pdb_pointer;
colorarray[0] = params[i].data.d_color.red;
colorarray[1] = params[i].data.d_color.green;
colorarray[2] = params[i].data.d_color.blue;
args[i].value.pdb_color = params[i].data.d_color;
break;
case PDB_REGION:
g_message ("the \"region\" arg type is not currently supported");
@ -3038,7 +3042,7 @@ plug_in_params_to_args (GPParam *params,
args[i].value.pdb_pointer =
gimp_parasite_copy ((GimpParasite *) &(params[i].data.d_parasite));
else
args[i].value.pdb_pointer = (void *)&(params[i].data.d_parasite);
args[i].value.pdb_pointer = (gpointer) &(params[i].data.d_parasite);
break;
case PDB_STATUS:
args[i].value.pdb_int = params[i].data.d_status;
@ -3058,8 +3062,7 @@ plug_in_args_to_params (Argument *args,
{
GPParam *params;
gchar **stringarray;
guchar *colorarray;
gint i, j;
gint i, j;
if (nargs == 0)
return NULL;
@ -3157,19 +3160,7 @@ plug_in_args_to_params (Argument *args,
}
break;
case PDB_COLOR:
colorarray = args[i].value.pdb_pointer;
if( colorarray )
{
params[i].data.d_color.red = colorarray[0];
params[i].data.d_color.green = colorarray[1];
params[i].data.d_color.blue = colorarray[2];
}
else
{
params[i].data.d_color.red = 0;
params[i].data.d_color.green = 0;
params[i].data.d_color.blue = 0;
}
params[i].data.d_color = args[i].value.pdb_color;
break;
case PDB_REGION:
g_message ("the \"region\" arg type is not currently supported");
@ -3373,7 +3364,6 @@ plug_in_args_destroy (Argument *args,
}
break;
case PDB_COLOR:
g_free (args[i].value.pdb_pointer);
break;
case PDB_REGION:
g_message ("the \"region\" arg type is not currently supported");

View File

@ -2447,12 +2447,16 @@ plug_in_add_to_db (void)
if (proc_def->image_types)
{
return_vals = procedural_db_execute ("gimp_register_save_handler", args);
return_vals =
procedural_db_execute ("gimp_register_save_handler",
args);
g_free (return_vals);
}
else
{
return_vals = procedural_db_execute ("gimp_register_magic_load_handler", args);
return_vals =
procedural_db_execute ("gimp_register_magic_load_handler",
args);
g_free (return_vals);
}
}
@ -2904,9 +2908,8 @@ plug_in_params_to_args (GPParam *params,
{
Argument *args;
gchar **stringarray;
guchar *colorarray;
gint count;
gint i, j;
gint count;
gint i, j;
if (nparams == 0)
return NULL;
@ -2942,7 +2945,8 @@ plug_in_params_to_args (GPParam *params,
{
count = args[i-1].value.pdb_int;
args[i].value.pdb_pointer = g_new (gint32, count);
memcpy (args[i].value.pdb_pointer, params[i].data.d_int32array, count * 4);
memcpy (args[i].value.pdb_pointer,
params[i].data.d_int32array, count * 4);
}
else
{
@ -2954,7 +2958,8 @@ plug_in_params_to_args (GPParam *params,
{
count = args[i-1].value.pdb_int;
args[i].value.pdb_pointer = g_new (gint16, count);
memcpy (args[i].value.pdb_pointer, params[i].data.d_int16array, count * 2);
memcpy (args[i].value.pdb_pointer,
params[i].data.d_int16array, count * 2);
}
else
{
@ -2966,7 +2971,8 @@ plug_in_params_to_args (GPParam *params,
{
count = args[i-1].value.pdb_int;
args[i].value.pdb_pointer = g_new (gint8, count);
memcpy (args[i].value.pdb_pointer, params[i].data.d_int8array, count);
memcpy (args[i].value.pdb_pointer,
params[i].data.d_int8array, count);
}
else
{
@ -2978,7 +2984,8 @@ plug_in_params_to_args (GPParam *params,
{
count = args[i-1].value.pdb_int;
args[i].value.pdb_pointer = g_new (gdouble, count);
memcpy (args[i].value.pdb_pointer, params[i].data.d_floatarray, count * 8);
memcpy (args[i].value.pdb_pointer,
params[i].data.d_floatarray, count * 8);
}
else
{
@ -2988,7 +2995,8 @@ plug_in_params_to_args (GPParam *params,
case PDB_STRINGARRAY:
if (full_copy)
{
args[i].value.pdb_pointer = g_new (gchar*, args[i-1].value.pdb_int);
args[i].value.pdb_pointer = g_new (gchar *,
args[i-1].value.pdb_int);
stringarray = args[i].value.pdb_pointer;
for (j = 0; j < args[i-1].value.pdb_int; j++)
@ -3000,11 +3008,7 @@ plug_in_params_to_args (GPParam *params,
}
break;
case PDB_COLOR:
args[i].value.pdb_pointer = g_new (guchar, 3);
colorarray = args[i].value.pdb_pointer;
colorarray[0] = params[i].data.d_color.red;
colorarray[1] = params[i].data.d_color.green;
colorarray[2] = params[i].data.d_color.blue;
args[i].value.pdb_color = params[i].data.d_color;
break;
case PDB_REGION:
g_message ("the \"region\" arg type is not currently supported");
@ -3038,7 +3042,7 @@ plug_in_params_to_args (GPParam *params,
args[i].value.pdb_pointer =
gimp_parasite_copy ((GimpParasite *) &(params[i].data.d_parasite));
else
args[i].value.pdb_pointer = (void *)&(params[i].data.d_parasite);
args[i].value.pdb_pointer = (gpointer) &(params[i].data.d_parasite);
break;
case PDB_STATUS:
args[i].value.pdb_int = params[i].data.d_status;
@ -3058,8 +3062,7 @@ plug_in_args_to_params (Argument *args,
{
GPParam *params;
gchar **stringarray;
guchar *colorarray;
gint i, j;
gint i, j;
if (nargs == 0)
return NULL;
@ -3157,19 +3160,7 @@ plug_in_args_to_params (Argument *args,
}
break;
case PDB_COLOR:
colorarray = args[i].value.pdb_pointer;
if( colorarray )
{
params[i].data.d_color.red = colorarray[0];
params[i].data.d_color.green = colorarray[1];
params[i].data.d_color.blue = colorarray[2];
}
else
{
params[i].data.d_color.red = 0;
params[i].data.d_color.green = 0;
params[i].data.d_color.blue = 0;
}
params[i].data.d_color = args[i].value.pdb_color;
break;
case PDB_REGION:
g_message ("the \"region\" arg type is not currently supported");
@ -3373,7 +3364,6 @@ plug_in_args_destroy (Argument *args,
}
break;
case PDB_COLOR:
g_free (args[i].value.pdb_pointer);
break;
case PDB_REGION:
g_message ("the \"region\" arg type is not currently supported");

View File

@ -2447,12 +2447,16 @@ plug_in_add_to_db (void)
if (proc_def->image_types)
{
return_vals = procedural_db_execute ("gimp_register_save_handler", args);
return_vals =
procedural_db_execute ("gimp_register_save_handler",
args);
g_free (return_vals);
}
else
{
return_vals = procedural_db_execute ("gimp_register_magic_load_handler", args);
return_vals =
procedural_db_execute ("gimp_register_magic_load_handler",
args);
g_free (return_vals);
}
}
@ -2904,9 +2908,8 @@ plug_in_params_to_args (GPParam *params,
{
Argument *args;
gchar **stringarray;
guchar *colorarray;
gint count;
gint i, j;
gint count;
gint i, j;
if (nparams == 0)
return NULL;
@ -2942,7 +2945,8 @@ plug_in_params_to_args (GPParam *params,
{
count = args[i-1].value.pdb_int;
args[i].value.pdb_pointer = g_new (gint32, count);
memcpy (args[i].value.pdb_pointer, params[i].data.d_int32array, count * 4);
memcpy (args[i].value.pdb_pointer,
params[i].data.d_int32array, count * 4);
}
else
{
@ -2954,7 +2958,8 @@ plug_in_params_to_args (GPParam *params,
{
count = args[i-1].value.pdb_int;
args[i].value.pdb_pointer = g_new (gint16, count);
memcpy (args[i].value.pdb_pointer, params[i].data.d_int16array, count * 2);
memcpy (args[i].value.pdb_pointer,
params[i].data.d_int16array, count * 2);
}
else
{
@ -2966,7 +2971,8 @@ plug_in_params_to_args (GPParam *params,
{
count = args[i-1].value.pdb_int;
args[i].value.pdb_pointer = g_new (gint8, count);
memcpy (args[i].value.pdb_pointer, params[i].data.d_int8array, count);
memcpy (args[i].value.pdb_pointer,
params[i].data.d_int8array, count);
}
else
{
@ -2978,7 +2984,8 @@ plug_in_params_to_args (GPParam *params,
{
count = args[i-1].value.pdb_int;
args[i].value.pdb_pointer = g_new (gdouble, count);
memcpy (args[i].value.pdb_pointer, params[i].data.d_floatarray, count * 8);
memcpy (args[i].value.pdb_pointer,
params[i].data.d_floatarray, count * 8);
}
else
{
@ -2988,7 +2995,8 @@ plug_in_params_to_args (GPParam *params,
case PDB_STRINGARRAY:
if (full_copy)
{
args[i].value.pdb_pointer = g_new (gchar*, args[i-1].value.pdb_int);
args[i].value.pdb_pointer = g_new (gchar *,
args[i-1].value.pdb_int);
stringarray = args[i].value.pdb_pointer;
for (j = 0; j < args[i-1].value.pdb_int; j++)
@ -3000,11 +3008,7 @@ plug_in_params_to_args (GPParam *params,
}
break;
case PDB_COLOR:
args[i].value.pdb_pointer = g_new (guchar, 3);
colorarray = args[i].value.pdb_pointer;
colorarray[0] = params[i].data.d_color.red;
colorarray[1] = params[i].data.d_color.green;
colorarray[2] = params[i].data.d_color.blue;
args[i].value.pdb_color = params[i].data.d_color;
break;
case PDB_REGION:
g_message ("the \"region\" arg type is not currently supported");
@ -3038,7 +3042,7 @@ plug_in_params_to_args (GPParam *params,
args[i].value.pdb_pointer =
gimp_parasite_copy ((GimpParasite *) &(params[i].data.d_parasite));
else
args[i].value.pdb_pointer = (void *)&(params[i].data.d_parasite);
args[i].value.pdb_pointer = (gpointer) &(params[i].data.d_parasite);
break;
case PDB_STATUS:
args[i].value.pdb_int = params[i].data.d_status;
@ -3058,8 +3062,7 @@ plug_in_args_to_params (Argument *args,
{
GPParam *params;
gchar **stringarray;
guchar *colorarray;
gint i, j;
gint i, j;
if (nargs == 0)
return NULL;
@ -3157,19 +3160,7 @@ plug_in_args_to_params (Argument *args,
}
break;
case PDB_COLOR:
colorarray = args[i].value.pdb_pointer;
if( colorarray )
{
params[i].data.d_color.red = colorarray[0];
params[i].data.d_color.green = colorarray[1];
params[i].data.d_color.blue = colorarray[2];
}
else
{
params[i].data.d_color.red = 0;
params[i].data.d_color.green = 0;
params[i].data.d_color.blue = 0;
}
params[i].data.d_color = args[i].value.pdb_color;
break;
case PDB_REGION:
g_message ("the \"region\" arg type is not currently supported");
@ -3373,7 +3364,6 @@ plug_in_args_destroy (Argument *args,
}
break;
case PDB_COLOR:
g_free (args[i].value.pdb_pointer);
break;
case PDB_REGION:
g_message ("the \"region\" arg type is not currently supported");

View File

@ -2447,12 +2447,16 @@ plug_in_add_to_db (void)
if (proc_def->image_types)
{
return_vals = procedural_db_execute ("gimp_register_save_handler", args);
return_vals =
procedural_db_execute ("gimp_register_save_handler",
args);
g_free (return_vals);
}
else
{
return_vals = procedural_db_execute ("gimp_register_magic_load_handler", args);
return_vals =
procedural_db_execute ("gimp_register_magic_load_handler",
args);
g_free (return_vals);
}
}
@ -2904,9 +2908,8 @@ plug_in_params_to_args (GPParam *params,
{
Argument *args;
gchar **stringarray;
guchar *colorarray;
gint count;
gint i, j;
gint count;
gint i, j;
if (nparams == 0)
return NULL;
@ -2942,7 +2945,8 @@ plug_in_params_to_args (GPParam *params,
{
count = args[i-1].value.pdb_int;
args[i].value.pdb_pointer = g_new (gint32, count);
memcpy (args[i].value.pdb_pointer, params[i].data.d_int32array, count * 4);
memcpy (args[i].value.pdb_pointer,
params[i].data.d_int32array, count * 4);
}
else
{
@ -2954,7 +2958,8 @@ plug_in_params_to_args (GPParam *params,
{
count = args[i-1].value.pdb_int;
args[i].value.pdb_pointer = g_new (gint16, count);
memcpy (args[i].value.pdb_pointer, params[i].data.d_int16array, count * 2);
memcpy (args[i].value.pdb_pointer,
params[i].data.d_int16array, count * 2);
}
else
{
@ -2966,7 +2971,8 @@ plug_in_params_to_args (GPParam *params,
{
count = args[i-1].value.pdb_int;
args[i].value.pdb_pointer = g_new (gint8, count);
memcpy (args[i].value.pdb_pointer, params[i].data.d_int8array, count);
memcpy (args[i].value.pdb_pointer,
params[i].data.d_int8array, count);
}
else
{
@ -2978,7 +2984,8 @@ plug_in_params_to_args (GPParam *params,
{
count = args[i-1].value.pdb_int;
args[i].value.pdb_pointer = g_new (gdouble, count);
memcpy (args[i].value.pdb_pointer, params[i].data.d_floatarray, count * 8);
memcpy (args[i].value.pdb_pointer,
params[i].data.d_floatarray, count * 8);
}
else
{
@ -2988,7 +2995,8 @@ plug_in_params_to_args (GPParam *params,
case PDB_STRINGARRAY:
if (full_copy)
{
args[i].value.pdb_pointer = g_new (gchar*, args[i-1].value.pdb_int);
args[i].value.pdb_pointer = g_new (gchar *,
args[i-1].value.pdb_int);
stringarray = args[i].value.pdb_pointer;
for (j = 0; j < args[i-1].value.pdb_int; j++)
@ -3000,11 +3008,7 @@ plug_in_params_to_args (GPParam *params,
}
break;
case PDB_COLOR:
args[i].value.pdb_pointer = g_new (guchar, 3);
colorarray = args[i].value.pdb_pointer;
colorarray[0] = params[i].data.d_color.red;
colorarray[1] = params[i].data.d_color.green;
colorarray[2] = params[i].data.d_color.blue;
args[i].value.pdb_color = params[i].data.d_color;
break;
case PDB_REGION:
g_message ("the \"region\" arg type is not currently supported");
@ -3038,7 +3042,7 @@ plug_in_params_to_args (GPParam *params,
args[i].value.pdb_pointer =
gimp_parasite_copy ((GimpParasite *) &(params[i].data.d_parasite));
else
args[i].value.pdb_pointer = (void *)&(params[i].data.d_parasite);
args[i].value.pdb_pointer = (gpointer) &(params[i].data.d_parasite);
break;
case PDB_STATUS:
args[i].value.pdb_int = params[i].data.d_status;
@ -3058,8 +3062,7 @@ plug_in_args_to_params (Argument *args,
{
GPParam *params;
gchar **stringarray;
guchar *colorarray;
gint i, j;
gint i, j;
if (nargs == 0)
return NULL;
@ -3157,19 +3160,7 @@ plug_in_args_to_params (Argument *args,
}
break;
case PDB_COLOR:
colorarray = args[i].value.pdb_pointer;
if( colorarray )
{
params[i].data.d_color.red = colorarray[0];
params[i].data.d_color.green = colorarray[1];
params[i].data.d_color.blue = colorarray[2];
}
else
{
params[i].data.d_color.red = 0;
params[i].data.d_color.green = 0;
params[i].data.d_color.blue = 0;
}
params[i].data.d_color = args[i].value.pdb_color;
break;
case PDB_REGION:
g_message ("the \"region\" arg type is not currently supported");
@ -3373,7 +3364,6 @@ plug_in_args_destroy (Argument *args,
}
break;
case PDB_COLOR:
g_free (args[i].value.pdb_pointer);
break;
case PDB_REGION:
g_message ("the \"region\" arg type is not currently supported");

View File

@ -2447,12 +2447,16 @@ plug_in_add_to_db (void)
if (proc_def->image_types)
{
return_vals = procedural_db_execute ("gimp_register_save_handler", args);
return_vals =
procedural_db_execute ("gimp_register_save_handler",
args);
g_free (return_vals);
}
else
{
return_vals = procedural_db_execute ("gimp_register_magic_load_handler", args);
return_vals =
procedural_db_execute ("gimp_register_magic_load_handler",
args);
g_free (return_vals);
}
}
@ -2904,9 +2908,8 @@ plug_in_params_to_args (GPParam *params,
{
Argument *args;
gchar **stringarray;
guchar *colorarray;
gint count;
gint i, j;
gint count;
gint i, j;
if (nparams == 0)
return NULL;
@ -2942,7 +2945,8 @@ plug_in_params_to_args (GPParam *params,
{
count = args[i-1].value.pdb_int;
args[i].value.pdb_pointer = g_new (gint32, count);
memcpy (args[i].value.pdb_pointer, params[i].data.d_int32array, count * 4);
memcpy (args[i].value.pdb_pointer,
params[i].data.d_int32array, count * 4);
}
else
{
@ -2954,7 +2958,8 @@ plug_in_params_to_args (GPParam *params,
{
count = args[i-1].value.pdb_int;
args[i].value.pdb_pointer = g_new (gint16, count);
memcpy (args[i].value.pdb_pointer, params[i].data.d_int16array, count * 2);
memcpy (args[i].value.pdb_pointer,
params[i].data.d_int16array, count * 2);
}
else
{
@ -2966,7 +2971,8 @@ plug_in_params_to_args (GPParam *params,
{
count = args[i-1].value.pdb_int;
args[i].value.pdb_pointer = g_new (gint8, count);
memcpy (args[i].value.pdb_pointer, params[i].data.d_int8array, count);
memcpy (args[i].value.pdb_pointer,
params[i].data.d_int8array, count);
}
else
{
@ -2978,7 +2984,8 @@ plug_in_params_to_args (GPParam *params,
{
count = args[i-1].value.pdb_int;
args[i].value.pdb_pointer = g_new (gdouble, count);
memcpy (args[i].value.pdb_pointer, params[i].data.d_floatarray, count * 8);
memcpy (args[i].value.pdb_pointer,
params[i].data.d_floatarray, count * 8);
}
else
{
@ -2988,7 +2995,8 @@ plug_in_params_to_args (GPParam *params,
case PDB_STRINGARRAY:
if (full_copy)
{
args[i].value.pdb_pointer = g_new (gchar*, args[i-1].value.pdb_int);
args[i].value.pdb_pointer = g_new (gchar *,
args[i-1].value.pdb_int);
stringarray = args[i].value.pdb_pointer;
for (j = 0; j < args[i-1].value.pdb_int; j++)
@ -3000,11 +3008,7 @@ plug_in_params_to_args (GPParam *params,
}
break;
case PDB_COLOR:
args[i].value.pdb_pointer = g_new (guchar, 3);
colorarray = args[i].value.pdb_pointer;
colorarray[0] = params[i].data.d_color.red;
colorarray[1] = params[i].data.d_color.green;
colorarray[2] = params[i].data.d_color.blue;
args[i].value.pdb_color = params[i].data.d_color;
break;
case PDB_REGION:
g_message ("the \"region\" arg type is not currently supported");
@ -3038,7 +3042,7 @@ plug_in_params_to_args (GPParam *params,
args[i].value.pdb_pointer =
gimp_parasite_copy ((GimpParasite *) &(params[i].data.d_parasite));
else
args[i].value.pdb_pointer = (void *)&(params[i].data.d_parasite);
args[i].value.pdb_pointer = (gpointer) &(params[i].data.d_parasite);
break;
case PDB_STATUS:
args[i].value.pdb_int = params[i].data.d_status;
@ -3058,8 +3062,7 @@ plug_in_args_to_params (Argument *args,
{
GPParam *params;
gchar **stringarray;
guchar *colorarray;
gint i, j;
gint i, j;
if (nargs == 0)
return NULL;
@ -3157,19 +3160,7 @@ plug_in_args_to_params (Argument *args,
}
break;
case PDB_COLOR:
colorarray = args[i].value.pdb_pointer;
if( colorarray )
{
params[i].data.d_color.red = colorarray[0];
params[i].data.d_color.green = colorarray[1];
params[i].data.d_color.blue = colorarray[2];
}
else
{
params[i].data.d_color.red = 0;
params[i].data.d_color.green = 0;
params[i].data.d_color.blue = 0;
}
params[i].data.d_color = args[i].value.pdb_color;
break;
case PDB_REGION:
g_message ("the \"region\" arg type is not currently supported");
@ -3373,7 +3364,6 @@ plug_in_args_destroy (Argument *args,
}
break;
case PDB_COLOR:
g_free (args[i].value.pdb_pointer);
break;
case PDB_REGION:
g_message ("the \"region\" arg type is not currently supported");

View File

@ -2447,12 +2447,16 @@ plug_in_add_to_db (void)
if (proc_def->image_types)
{
return_vals = procedural_db_execute ("gimp_register_save_handler", args);
return_vals =
procedural_db_execute ("gimp_register_save_handler",
args);
g_free (return_vals);
}
else
{
return_vals = procedural_db_execute ("gimp_register_magic_load_handler", args);
return_vals =
procedural_db_execute ("gimp_register_magic_load_handler",
args);
g_free (return_vals);
}
}
@ -2904,9 +2908,8 @@ plug_in_params_to_args (GPParam *params,
{
Argument *args;
gchar **stringarray;
guchar *colorarray;
gint count;
gint i, j;
gint count;
gint i, j;
if (nparams == 0)
return NULL;
@ -2942,7 +2945,8 @@ plug_in_params_to_args (GPParam *params,
{
count = args[i-1].value.pdb_int;
args[i].value.pdb_pointer = g_new (gint32, count);
memcpy (args[i].value.pdb_pointer, params[i].data.d_int32array, count * 4);
memcpy (args[i].value.pdb_pointer,
params[i].data.d_int32array, count * 4);
}
else
{
@ -2954,7 +2958,8 @@ plug_in_params_to_args (GPParam *params,
{
count = args[i-1].value.pdb_int;
args[i].value.pdb_pointer = g_new (gint16, count);
memcpy (args[i].value.pdb_pointer, params[i].data.d_int16array, count * 2);
memcpy (args[i].value.pdb_pointer,
params[i].data.d_int16array, count * 2);
}
else
{
@ -2966,7 +2971,8 @@ plug_in_params_to_args (GPParam *params,
{
count = args[i-1].value.pdb_int;
args[i].value.pdb_pointer = g_new (gint8, count);
memcpy (args[i].value.pdb_pointer, params[i].data.d_int8array, count);
memcpy (args[i].value.pdb_pointer,
params[i].data.d_int8array, count);
}
else
{
@ -2978,7 +2984,8 @@ plug_in_params_to_args (GPParam *params,
{
count = args[i-1].value.pdb_int;
args[i].value.pdb_pointer = g_new (gdouble, count);
memcpy (args[i].value.pdb_pointer, params[i].data.d_floatarray, count * 8);
memcpy (args[i].value.pdb_pointer,
params[i].data.d_floatarray, count * 8);
}
else
{
@ -2988,7 +2995,8 @@ plug_in_params_to_args (GPParam *params,
case PDB_STRINGARRAY:
if (full_copy)
{
args[i].value.pdb_pointer = g_new (gchar*, args[i-1].value.pdb_int);
args[i].value.pdb_pointer = g_new (gchar *,
args[i-1].value.pdb_int);
stringarray = args[i].value.pdb_pointer;
for (j = 0; j < args[i-1].value.pdb_int; j++)
@ -3000,11 +3008,7 @@ plug_in_params_to_args (GPParam *params,
}
break;
case PDB_COLOR:
args[i].value.pdb_pointer = g_new (guchar, 3);
colorarray = args[i].value.pdb_pointer;
colorarray[0] = params[i].data.d_color.red;
colorarray[1] = params[i].data.d_color.green;
colorarray[2] = params[i].data.d_color.blue;
args[i].value.pdb_color = params[i].data.d_color;
break;
case PDB_REGION:
g_message ("the \"region\" arg type is not currently supported");
@ -3038,7 +3042,7 @@ plug_in_params_to_args (GPParam *params,
args[i].value.pdb_pointer =
gimp_parasite_copy ((GimpParasite *) &(params[i].data.d_parasite));
else
args[i].value.pdb_pointer = (void *)&(params[i].data.d_parasite);
args[i].value.pdb_pointer = (gpointer) &(params[i].data.d_parasite);
break;
case PDB_STATUS:
args[i].value.pdb_int = params[i].data.d_status;
@ -3058,8 +3062,7 @@ plug_in_args_to_params (Argument *args,
{
GPParam *params;
gchar **stringarray;
guchar *colorarray;
gint i, j;
gint i, j;
if (nargs == 0)
return NULL;
@ -3157,19 +3160,7 @@ plug_in_args_to_params (Argument *args,
}
break;
case PDB_COLOR:
colorarray = args[i].value.pdb_pointer;
if( colorarray )
{
params[i].data.d_color.red = colorarray[0];
params[i].data.d_color.green = colorarray[1];
params[i].data.d_color.blue = colorarray[2];
}
else
{
params[i].data.d_color.red = 0;
params[i].data.d_color.green = 0;
params[i].data.d_color.blue = 0;
}
params[i].data.d_color = args[i].value.pdb_color;
break;
case PDB_REGION:
g_message ("the \"region\" arg type is not currently supported");
@ -3373,7 +3364,6 @@ plug_in_args_destroy (Argument *args,
}
break;
case PDB_COLOR:
g_free (args[i].value.pdb_pointer);
break;
case PDB_REGION:
g_message ("the \"region\" arg type is not currently supported");

View File

@ -2447,12 +2447,16 @@ plug_in_add_to_db (void)
if (proc_def->image_types)
{
return_vals = procedural_db_execute ("gimp_register_save_handler", args);
return_vals =
procedural_db_execute ("gimp_register_save_handler",
args);
g_free (return_vals);
}
else
{
return_vals = procedural_db_execute ("gimp_register_magic_load_handler", args);
return_vals =
procedural_db_execute ("gimp_register_magic_load_handler",
args);
g_free (return_vals);
}
}
@ -2904,9 +2908,8 @@ plug_in_params_to_args (GPParam *params,
{
Argument *args;
gchar **stringarray;
guchar *colorarray;
gint count;
gint i, j;
gint count;
gint i, j;
if (nparams == 0)
return NULL;
@ -2942,7 +2945,8 @@ plug_in_params_to_args (GPParam *params,
{
count = args[i-1].value.pdb_int;
args[i].value.pdb_pointer = g_new (gint32, count);
memcpy (args[i].value.pdb_pointer, params[i].data.d_int32array, count * 4);
memcpy (args[i].value.pdb_pointer,
params[i].data.d_int32array, count * 4);
}
else
{
@ -2954,7 +2958,8 @@ plug_in_params_to_args (GPParam *params,
{
count = args[i-1].value.pdb_int;
args[i].value.pdb_pointer = g_new (gint16, count);
memcpy (args[i].value.pdb_pointer, params[i].data.d_int16array, count * 2);
memcpy (args[i].value.pdb_pointer,
params[i].data.d_int16array, count * 2);
}
else
{
@ -2966,7 +2971,8 @@ plug_in_params_to_args (GPParam *params,
{
count = args[i-1].value.pdb_int;
args[i].value.pdb_pointer = g_new (gint8, count);
memcpy (args[i].value.pdb_pointer, params[i].data.d_int8array, count);
memcpy (args[i].value.pdb_pointer,
params[i].data.d_int8array, count);
}
else
{
@ -2978,7 +2984,8 @@ plug_in_params_to_args (GPParam *params,
{
count = args[i-1].value.pdb_int;
args[i].value.pdb_pointer = g_new (gdouble, count);
memcpy (args[i].value.pdb_pointer, params[i].data.d_floatarray, count * 8);
memcpy (args[i].value.pdb_pointer,
params[i].data.d_floatarray, count * 8);
}
else
{
@ -2988,7 +2995,8 @@ plug_in_params_to_args (GPParam *params,
case PDB_STRINGARRAY:
if (full_copy)
{
args[i].value.pdb_pointer = g_new (gchar*, args[i-1].value.pdb_int);
args[i].value.pdb_pointer = g_new (gchar *,
args[i-1].value.pdb_int);
stringarray = args[i].value.pdb_pointer;
for (j = 0; j < args[i-1].value.pdb_int; j++)
@ -3000,11 +3008,7 @@ plug_in_params_to_args (GPParam *params,
}
break;
case PDB_COLOR:
args[i].value.pdb_pointer = g_new (guchar, 3);
colorarray = args[i].value.pdb_pointer;
colorarray[0] = params[i].data.d_color.red;
colorarray[1] = params[i].data.d_color.green;
colorarray[2] = params[i].data.d_color.blue;
args[i].value.pdb_color = params[i].data.d_color;
break;
case PDB_REGION:
g_message ("the \"region\" arg type is not currently supported");
@ -3038,7 +3042,7 @@ plug_in_params_to_args (GPParam *params,
args[i].value.pdb_pointer =
gimp_parasite_copy ((GimpParasite *) &(params[i].data.d_parasite));
else
args[i].value.pdb_pointer = (void *)&(params[i].data.d_parasite);
args[i].value.pdb_pointer = (gpointer) &(params[i].data.d_parasite);
break;
case PDB_STATUS:
args[i].value.pdb_int = params[i].data.d_status;
@ -3058,8 +3062,7 @@ plug_in_args_to_params (Argument *args,
{
GPParam *params;
gchar **stringarray;
guchar *colorarray;
gint i, j;
gint i, j;
if (nargs == 0)
return NULL;
@ -3157,19 +3160,7 @@ plug_in_args_to_params (Argument *args,
}
break;
case PDB_COLOR:
colorarray = args[i].value.pdb_pointer;
if( colorarray )
{
params[i].data.d_color.red = colorarray[0];
params[i].data.d_color.green = colorarray[1];
params[i].data.d_color.blue = colorarray[2];
}
else
{
params[i].data.d_color.red = 0;
params[i].data.d_color.green = 0;
params[i].data.d_color.blue = 0;
}
params[i].data.d_color = args[i].value.pdb_color;
break;
case PDB_REGION:
g_message ("the \"region\" arg type is not currently supported");
@ -3373,7 +3364,6 @@ plug_in_args_destroy (Argument *args,
}
break;
case PDB_COLOR:
g_free (args[i].value.pdb_pointer);
break;
case PDB_REGION:
g_message ("the \"region\" arg type is not currently supported");

View File

@ -2447,12 +2447,16 @@ plug_in_add_to_db (void)
if (proc_def->image_types)
{
return_vals = procedural_db_execute ("gimp_register_save_handler", args);
return_vals =
procedural_db_execute ("gimp_register_save_handler",
args);
g_free (return_vals);
}
else
{
return_vals = procedural_db_execute ("gimp_register_magic_load_handler", args);
return_vals =
procedural_db_execute ("gimp_register_magic_load_handler",
args);
g_free (return_vals);
}
}
@ -2904,9 +2908,8 @@ plug_in_params_to_args (GPParam *params,
{
Argument *args;
gchar **stringarray;
guchar *colorarray;
gint count;
gint i, j;
gint count;
gint i, j;
if (nparams == 0)
return NULL;
@ -2942,7 +2945,8 @@ plug_in_params_to_args (GPParam *params,
{
count = args[i-1].value.pdb_int;
args[i].value.pdb_pointer = g_new (gint32, count);
memcpy (args[i].value.pdb_pointer, params[i].data.d_int32array, count * 4);
memcpy (args[i].value.pdb_pointer,
params[i].data.d_int32array, count * 4);
}
else
{
@ -2954,7 +2958,8 @@ plug_in_params_to_args (GPParam *params,
{
count = args[i-1].value.pdb_int;
args[i].value.pdb_pointer = g_new (gint16, count);
memcpy (args[i].value.pdb_pointer, params[i].data.d_int16array, count * 2);
memcpy (args[i].value.pdb_pointer,
params[i].data.d_int16array, count * 2);
}
else
{
@ -2966,7 +2971,8 @@ plug_in_params_to_args (GPParam *params,
{
count = args[i-1].value.pdb_int;
args[i].value.pdb_pointer = g_new (gint8, count);
memcpy (args[i].value.pdb_pointer, params[i].data.d_int8array, count);
memcpy (args[i].value.pdb_pointer,
params[i].data.d_int8array, count);
}
else
{
@ -2978,7 +2984,8 @@ plug_in_params_to_args (GPParam *params,
{
count = args[i-1].value.pdb_int;
args[i].value.pdb_pointer = g_new (gdouble, count);
memcpy (args[i].value.pdb_pointer, params[i].data.d_floatarray, count * 8);
memcpy (args[i].value.pdb_pointer,
params[i].data.d_floatarray, count * 8);
}
else
{
@ -2988,7 +2995,8 @@ plug_in_params_to_args (GPParam *params,
case PDB_STRINGARRAY:
if (full_copy)
{
args[i].value.pdb_pointer = g_new (gchar*, args[i-1].value.pdb_int);
args[i].value.pdb_pointer = g_new (gchar *,
args[i-1].value.pdb_int);
stringarray = args[i].value.pdb_pointer;
for (j = 0; j < args[i-1].value.pdb_int; j++)
@ -3000,11 +3008,7 @@ plug_in_params_to_args (GPParam *params,
}
break;
case PDB_COLOR:
args[i].value.pdb_pointer = g_new (guchar, 3);
colorarray = args[i].value.pdb_pointer;
colorarray[0] = params[i].data.d_color.red;
colorarray[1] = params[i].data.d_color.green;
colorarray[2] = params[i].data.d_color.blue;
args[i].value.pdb_color = params[i].data.d_color;
break;
case PDB_REGION:
g_message ("the \"region\" arg type is not currently supported");
@ -3038,7 +3042,7 @@ plug_in_params_to_args (GPParam *params,
args[i].value.pdb_pointer =
gimp_parasite_copy ((GimpParasite *) &(params[i].data.d_parasite));
else
args[i].value.pdb_pointer = (void *)&(params[i].data.d_parasite);
args[i].value.pdb_pointer = (gpointer) &(params[i].data.d_parasite);
break;
case PDB_STATUS:
args[i].value.pdb_int = params[i].data.d_status;
@ -3058,8 +3062,7 @@ plug_in_args_to_params (Argument *args,
{
GPParam *params;
gchar **stringarray;
guchar *colorarray;
gint i, j;
gint i, j;
if (nargs == 0)
return NULL;
@ -3157,19 +3160,7 @@ plug_in_args_to_params (Argument *args,
}
break;
case PDB_COLOR:
colorarray = args[i].value.pdb_pointer;
if( colorarray )
{
params[i].data.d_color.red = colorarray[0];
params[i].data.d_color.green = colorarray[1];
params[i].data.d_color.blue = colorarray[2];
}
else
{
params[i].data.d_color.red = 0;
params[i].data.d_color.green = 0;
params[i].data.d_color.blue = 0;
}
params[i].data.d_color = args[i].value.pdb_color;
break;
case PDB_REGION:
g_message ("the \"region\" arg type is not currently supported");
@ -3373,7 +3364,6 @@ plug_in_args_destroy (Argument *args,
}
break;
case PDB_COLOR:
g_free (args[i].value.pdb_pointer);
break;
case PDB_REGION:
g_message ("the \"region\" arg type is not currently supported");

View File

@ -2447,12 +2447,16 @@ plug_in_add_to_db (void)
if (proc_def->image_types)
{
return_vals = procedural_db_execute ("gimp_register_save_handler", args);
return_vals =
procedural_db_execute ("gimp_register_save_handler",
args);
g_free (return_vals);
}
else
{
return_vals = procedural_db_execute ("gimp_register_magic_load_handler", args);
return_vals =
procedural_db_execute ("gimp_register_magic_load_handler",
args);
g_free (return_vals);
}
}
@ -2904,9 +2908,8 @@ plug_in_params_to_args (GPParam *params,
{
Argument *args;
gchar **stringarray;
guchar *colorarray;
gint count;
gint i, j;
gint count;
gint i, j;
if (nparams == 0)
return NULL;
@ -2942,7 +2945,8 @@ plug_in_params_to_args (GPParam *params,
{
count = args[i-1].value.pdb_int;
args[i].value.pdb_pointer = g_new (gint32, count);
memcpy (args[i].value.pdb_pointer, params[i].data.d_int32array, count * 4);
memcpy (args[i].value.pdb_pointer,
params[i].data.d_int32array, count * 4);
}
else
{
@ -2954,7 +2958,8 @@ plug_in_params_to_args (GPParam *params,
{
count = args[i-1].value.pdb_int;
args[i].value.pdb_pointer = g_new (gint16, count);
memcpy (args[i].value.pdb_pointer, params[i].data.d_int16array, count * 2);
memcpy (args[i].value.pdb_pointer,
params[i].data.d_int16array, count * 2);
}
else
{
@ -2966,7 +2971,8 @@ plug_in_params_to_args (GPParam *params,
{
count = args[i-1].value.pdb_int;
args[i].value.pdb_pointer = g_new (gint8, count);
memcpy (args[i].value.pdb_pointer, params[i].data.d_int8array, count);
memcpy (args[i].value.pdb_pointer,
params[i].data.d_int8array, count);
}
else
{
@ -2978,7 +2984,8 @@ plug_in_params_to_args (GPParam *params,
{
count = args[i-1].value.pdb_int;
args[i].value.pdb_pointer = g_new (gdouble, count);
memcpy (args[i].value.pdb_pointer, params[i].data.d_floatarray, count * 8);
memcpy (args[i].value.pdb_pointer,
params[i].data.d_floatarray, count * 8);
}
else
{
@ -2988,7 +2995,8 @@ plug_in_params_to_args (GPParam *params,
case PDB_STRINGARRAY:
if (full_copy)
{
args[i].value.pdb_pointer = g_new (gchar*, args[i-1].value.pdb_int);
args[i].value.pdb_pointer = g_new (gchar *,
args[i-1].value.pdb_int);
stringarray = args[i].value.pdb_pointer;
for (j = 0; j < args[i-1].value.pdb_int; j++)
@ -3000,11 +3008,7 @@ plug_in_params_to_args (GPParam *params,
}
break;
case PDB_COLOR:
args[i].value.pdb_pointer = g_new (guchar, 3);
colorarray = args[i].value.pdb_pointer;
colorarray[0] = params[i].data.d_color.red;
colorarray[1] = params[i].data.d_color.green;
colorarray[2] = params[i].data.d_color.blue;
args[i].value.pdb_color = params[i].data.d_color;
break;
case PDB_REGION:
g_message ("the \"region\" arg type is not currently supported");
@ -3038,7 +3042,7 @@ plug_in_params_to_args (GPParam *params,
args[i].value.pdb_pointer =
gimp_parasite_copy ((GimpParasite *) &(params[i].data.d_parasite));
else
args[i].value.pdb_pointer = (void *)&(params[i].data.d_parasite);
args[i].value.pdb_pointer = (gpointer) &(params[i].data.d_parasite);
break;
case PDB_STATUS:
args[i].value.pdb_int = params[i].data.d_status;
@ -3058,8 +3062,7 @@ plug_in_args_to_params (Argument *args,
{
GPParam *params;
gchar **stringarray;
guchar *colorarray;
gint i, j;
gint i, j;
if (nargs == 0)
return NULL;
@ -3157,19 +3160,7 @@ plug_in_args_to_params (Argument *args,
}
break;
case PDB_COLOR:
colorarray = args[i].value.pdb_pointer;
if( colorarray )
{
params[i].data.d_color.red = colorarray[0];
params[i].data.d_color.green = colorarray[1];
params[i].data.d_color.blue = colorarray[2];
}
else
{
params[i].data.d_color.red = 0;
params[i].data.d_color.green = 0;
params[i].data.d_color.blue = 0;
}
params[i].data.d_color = args[i].value.pdb_color;
break;
case PDB_REGION:
g_message ("the \"region\" arg type is not currently supported");
@ -3373,7 +3364,6 @@ plug_in_args_destroy (Argument *args,
}
break;
case PDB_COLOR:
g_free (args[i].value.pdb_pointer);
break;
case PDB_REGION:
g_message ("the \"region\" arg type is not currently supported");

View File

@ -146,8 +146,6 @@ libgimp_la_SOURCES = \
gimplayer.c \
gimplayer.h \
gimplimits.h \
gimppalette.c \
gimppalette.h \
gimpparasite.c \
gimpparasite.h \
gimpparasiteio.c \
@ -212,7 +210,6 @@ gimpinclude_HEADERS = \
gimplayer.h \
gimplimits.h \
gimpmodule.h \
gimppalette.h \
gimpparasite.h \
gimpparasiteio.h \
gimppixelrgn.h \

View File

@ -421,7 +421,6 @@ gimp_run_procedure (gchar *name,
GimpPDBArgType param_type;
GimpParam *return_vals;
va_list args;
guchar *color;
gint i;
proc_run.name = name;
@ -475,7 +474,6 @@ gimp_run_procedure (gchar *name,
(void) va_arg (args, gchar **);
break;
case GIMP_PDB_COLOR:
(void) va_arg (args, guchar *);
break;
case GIMP_PDB_PARASITE:
(void) va_arg (args, GimpParasite *);
@ -533,10 +531,6 @@ gimp_run_procedure (gchar *name,
proc_run.params[i].data.d_stringarray = va_arg (args, gchar **);
break;
case GIMP_PDB_COLOR:
color = va_arg (args, guchar *);
proc_run.params[i].data.d_color.red = color[0];
proc_run.params[i].data.d_color.green = color[1];
proc_run.params[i].data.d_color.blue = color[2];
break;
case GIMP_PDB_REGION:
break;

View File

@ -40,7 +40,6 @@
#include <libgimp/gimpimage.h>
#include <libgimp/gimplayer.h>
#include <libgimp/gimplimits.h>
#include <libgimp/gimppalette.h>
#include <libgimp/gimpparasite.h>
#include <libgimp/gimppixelrgn.h>
#include <libgimp/gimpproceduraldb.h>
@ -117,13 +116,6 @@ struct _GimpParamDef
gchar *description;
};
struct _GimpParamColor
{
guint8 red;
guint8 green;
guint8 blue;
};
struct _GimpParamRegion
{
gint32 x;
@ -144,7 +136,7 @@ union _GimpParamData
gint8 *d_int8array;
gdouble *d_floatarray;
gchar **d_stringarray;
GimpParamColor d_color;
GimpRGB d_color;
GimpParamRegion d_region;
gint32 d_display;
gint32 d_image;

View File

@ -49,14 +49,12 @@ gimp_channel_new (gint32 image_ID,
guint width,
guint height,
gdouble opacity,
guchar *color)
GimpRGB *color)
{
return _gimp_channel_new (image_ID,
width,
height,
name,
opacity,
color[0],
color[1],
color[2]);
color);
}

View File

@ -36,7 +36,7 @@ gint32 gimp_channel_new (gint32 image_ID,
guint width,
guint height,
gdouble opacity,
guchar *color);
GimpRGB *color);
#ifdef __cplusplus

View File

@ -30,9 +30,7 @@
* @height: The channel height.
* @name: The channel name.
* @opacity: The channel opacity.
* @red:
* @green:
* @blue: The channel compositing color.
* @color: The channel compositing color.
*
* Create a new channel.
*
@ -52,18 +50,11 @@ _gimp_channel_new (gint32 image_ID,
gint height,
gchar *name,
gdouble opacity,
guchar red,
guchar green,
guchar blue)
GimpRGB *color)
{
GimpParam *return_vals;
gint nreturn_vals;
gint32 channel_ID = -1;
guchar color[3];
color[0] = red;
color[1] = green;
color[2] = blue;
return_vals = gimp_run_procedure ("gimp_channel_new",
&nreturn_vals,
@ -402,9 +393,7 @@ gimp_channel_set_opacity (gint32 channel_ID,
/**
* gimp_channel_get_color:
* @channel_ID: The channel.
* @red:
* @green:
* @blue: The channel compositing color.
* @color: The channel compositing color.
*
* Get the compositing color of the specified channel.
*
@ -413,10 +402,8 @@ gimp_channel_set_opacity (gint32 channel_ID,
* Returns: TRUE on success.
*/
gboolean
gimp_channel_get_color (gint32 channel_ID,
guchar *red,
guchar *green,
guchar *blue)
gimp_channel_get_color (gint32 channel_ID,
GimpRGB *color)
{
GimpParam *return_vals;
gint nreturn_vals;
@ -430,52 +417,7 @@ gimp_channel_get_color (gint32 channel_ID,
success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
if (success)
{
*red = return_vals[1].data.d_color.red;
*green = return_vals[1].data.d_color.green;
*blue = return_vals[1].data.d_color.blue;
}
gimp_destroy_params (return_vals, nreturn_vals);
return success;
}
/**
* gimp_channel_set_color:
* @channel_ID: The channel.
* @red:
* @green:
* @blue: The new channel compositing color.
*
* Set the compositing color of the specified channel.
*
* This procedure sets the specified channel's compositing color.
*
* Returns: TRUE on success.
*/
gboolean
gimp_channel_set_color (gint32 channel_ID,
guchar red,
guchar green,
guchar blue)
{
GimpParam *return_vals;
gint nreturn_vals;
gboolean success = TRUE;
guchar color[3];
color[0] = red;
color[1] = green;
color[2] = blue;
return_vals = gimp_run_procedure ("gimp_channel_set_color",
&nreturn_vals,
GIMP_PDB_CHANNEL, channel_ID,
GIMP_PDB_COLOR, color,
GIMP_PDB_END);
success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
*color = return_vals[1].data.d_color;
gimp_destroy_params (return_vals, nreturn_vals);

View File

@ -36,9 +36,7 @@ gint32 _gimp_channel_new (gint32 image_ID,
gint height,
gchar *name,
gdouble opacity,
guchar red,
guchar green,
guchar blue);
GimpRGB *color);
gint32 gimp_channel_copy (gint32 channel_ID);
gboolean gimp_channel_delete (gint32 channel_ID);
gchar* gimp_channel_get_name (gint32 channel_ID);
@ -54,13 +52,7 @@ gdouble gimp_channel_get_opacity (gint32 channel_ID);
gboolean gimp_channel_set_opacity (gint32 channel_ID,
gdouble opacity);
gboolean gimp_channel_get_color (gint32 channel_ID,
guchar *red,
guchar *green,
guchar *blue);
gboolean gimp_channel_set_color (gint32 channel_ID,
guchar red,
guchar green,
guchar blue);
GimpRGB *color);
gint gimp_channel_get_tattoo (gint32 channel_ID);
gboolean gimp_channel_set_tattoo (gint32 channel_ID,
gint tattoo);

View File

@ -1,85 +0,0 @@
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#include "config.h"
#include <glib.h>
#include "libgimpcolor/gimpcolor.h"
#include "gimppalette_pdb.h"
/* These functions will become the default one day */
gboolean
gimp_palette_set_foreground_rgb (const GimpRGB *rgb)
{
guchar r, g, b;
g_return_val_if_fail (rgb != NULL, FALSE);
gimp_rgb_get_uchar (rgb, &r, &g, &b);
return gimp_palette_set_foreground (r, g, b);
}
gboolean
gimp_palette_get_foreground_rgb (GimpRGB *rgb)
{
guchar r, g, b;
g_return_val_if_fail (rgb != NULL, FALSE);
if (gimp_palette_get_foreground (&r, &g, &b))
{
gimp_rgb_set_uchar (rgb, r, g, b);
return TRUE;
}
return FALSE;
}
gboolean
gimp_palette_set_background_rgb (const GimpRGB *rgb)
{
guchar r, g, b;
g_return_val_if_fail (rgb != NULL, FALSE);
gimp_rgb_get_uchar (rgb, &r, &g, &b);
return gimp_palette_set_background (r, g, b);
}
gboolean
gimp_palette_get_background_rgb (GimpRGB *rgb)
{
guchar r, g, b;
g_return_val_if_fail (rgb != NULL, FALSE);
if (gimp_palette_get_background (&r, &g, &b))
{
gimp_rgb_set_uchar (rgb, r, g, b);
return TRUE;
}
return FALSE;
}

View File

@ -1,42 +0,0 @@
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#ifndef __GIMP_PALETTE_H__
#define __GIMP_PALETTE_H__
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/* For information look into the C source or the html documentation */
/* These will become the default one day */
gboolean gimp_palette_set_foreground_rgb (const GimpRGB *rgb);
gboolean gimp_palette_get_foreground_rgb (GimpRGB *rgb);
gboolean gimp_palette_set_background_rgb (const GimpRGB *rgb);
gboolean gimp_palette_get_background_rgb (GimpRGB *rgb);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* __GIMP_COLOR_H__ */

View File

@ -25,9 +25,7 @@
/**
* gimp_palette_get_foreground:
* @red:
* @green:
* @blue: The foreground color.
* @foreground: The foreground color.
*
* Get the current GIMP foreground color.
*
@ -38,9 +36,7 @@
* Returns: TRUE on success.
*/
gboolean
gimp_palette_get_foreground (guchar *red,
guchar *green,
guchar *blue)
gimp_palette_get_foreground (GimpRGB *foreground)
{
GimpParam *return_vals;
gint nreturn_vals;
@ -53,11 +49,7 @@ gimp_palette_get_foreground (guchar *red,
success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
if (success)
{
*red = return_vals[1].data.d_color.red;
*green = return_vals[1].data.d_color.green;
*blue = return_vals[1].data.d_color.blue;
}
*foreground = return_vals[1].data.d_color;
gimp_destroy_params (return_vals, nreturn_vals);
@ -66,9 +58,7 @@ gimp_palette_get_foreground (guchar *red,
/**
* gimp_palette_get_background:
* @red:
* @green:
* @blue: The background color.
* @background: The background color.
*
* Get the current GIMP background color.
*
@ -79,9 +69,7 @@ gimp_palette_get_foreground (guchar *red,
* Returns: TRUE on success.
*/
gboolean
gimp_palette_get_background (guchar *red,
guchar *green,
guchar *blue)
gimp_palette_get_background (GimpRGB *background)
{
GimpParam *return_vals;
gint nreturn_vals;
@ -94,11 +82,7 @@ gimp_palette_get_background (guchar *red,
success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
if (success)
{
*red = return_vals[1].data.d_color.red;
*green = return_vals[1].data.d_color.green;
*blue = return_vals[1].data.d_color.blue;
}
*background = return_vals[1].data.d_color;
gimp_destroy_params (return_vals, nreturn_vals);
@ -107,9 +91,7 @@ gimp_palette_get_background (guchar *red,
/**
* gimp_palette_set_foreground:
* @red:
* @green:
* @blue: The foreground color.
* @foreground: The foreground color.
*
* Set the current GIMP foreground color.
*
@ -120,18 +102,11 @@ gimp_palette_get_background (guchar *red,
* Returns: TRUE on success.
*/
gboolean
gimp_palette_set_foreground (guchar red,
guchar green,
guchar blue)
gimp_palette_set_foreground (GimpRGB *foreground)
{
GimpParam *return_vals;
gint nreturn_vals;
gboolean success = TRUE;
guchar foreground[3];
foreground[0] = red;
foreground[1] = green;
foreground[2] = blue;
return_vals = gimp_run_procedure ("gimp_palette_set_foreground",
&nreturn_vals,
@ -147,9 +122,7 @@ gimp_palette_set_foreground (guchar red,
/**
* gimp_palette_set_background:
* @red:
* @green:
* @blue: The background color.
* @background: The background color.
*
* Set the current GIMP background color.
*
@ -161,18 +134,11 @@ gimp_palette_set_foreground (guchar red,
* Returns: TRUE on success.
*/
gboolean
gimp_palette_set_background (guchar red,
guchar green,
guchar blue)
gimp_palette_set_background (GimpRGB *background)
{
GimpParam *return_vals;
gint nreturn_vals;
gboolean success = TRUE;
guchar background[3];
background[0] = red;
background[1] = green;
background[2] = blue;
return_vals = gimp_run_procedure ("gimp_palette_set_background",
&nreturn_vals,

View File

@ -31,18 +31,10 @@ extern "C" {
/* For information look into the C source or the html documentation */
gboolean gimp_palette_get_foreground (guchar *red,
guchar *green,
guchar *blue);
gboolean gimp_palette_get_background (guchar *red,
guchar *green,
guchar *blue);
gboolean gimp_palette_set_foreground (guchar red,
guchar green,
guchar blue);
gboolean gimp_palette_set_background (guchar red,
guchar green,
guchar blue);
gboolean gimp_palette_get_foreground (GimpRGB *foreground);
gboolean gimp_palette_get_background (GimpRGB *background);
gboolean gimp_palette_set_foreground (GimpRGB *foreground);
gboolean gimp_palette_set_background (GimpRGB *background);
gboolean gimp_palette_set_default_colors (void);
gboolean gimp_palette_swap_colors (void);
gboolean gimp_palette_refresh (void);

View File

@ -1092,13 +1092,15 @@ _gp_params_read (GIOChannel *channel,
break;
case GIMP_PDB_COLOR:
if (!wire_read_int8 (channel, (guint8*) &(*params)[i].data.d_color.red, 1))
if (!wire_read_double (channel, &(*params)[i].data.d_color.r, 1))
goto cleanup;
if (!wire_read_int8 (channel, (guint8*) &(*params)[i].data.d_color.green, 1))
if (!wire_read_double (channel, &(*params)[i].data.d_color.g, 1))
goto cleanup;
if (!wire_read_int8 (channel, (guint8*) &(*params)[i].data.d_color.blue, 1))
if (!wire_read_double (channel, &(*params)[i].data.d_color.b, 1))
goto cleanup;
break;
if (!wire_read_double (channel, &(*params)[i].data.d_color.a, 1))
goto cleanup;
break;
case GIMP_PDB_REGION:
break;
@ -1261,12 +1263,17 @@ _gp_params_write (GIOChannel *channel,
break;
case GIMP_PDB_COLOR:
if (!wire_write_int8 (channel, (guint8*) &params[i].data.d_color.red, 1))
return;
if (!wire_write_int8 (channel, (guint8*) &params[i].data.d_color.green, 1))
return;
if (!wire_write_int8 (channel, (guint8*) &params[i].data.d_color.blue, 1))
return;
{
GimpRGB *color = (GimpRGB *) &params[i].data.d_color;
if (!wire_write_double (channel, &color->r, 1))
return;
if (!wire_write_double (channel, &color->g, 1))
return;
if (!wire_write_double (channel, &color->b, 1))
return;
if (!wire_write_double (channel, &color->a, 1))
return;
}
break;
case GIMP_PDB_REGION:

View File

@ -1,21 +1,21 @@
/* LIBGIMP - The GIMP Library
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
*/
#ifndef __GIMP_PROTOCOL_H__
#define __GIMP_PROTOCOL_H__
@ -29,7 +29,7 @@ extern "C" {
/* Increment every time the protocol changes
*/
#define GP_VERSION 0x0004
#define GP_VERSION 0x0008
enum
@ -109,12 +109,7 @@ struct _GPParam
gint8 *d_int8array;
gdouble *d_floatarray;
gchar **d_stringarray;
struct
{
guint8 red;
guint8 green;
guint8 blue;
} d_color;
GimpRGB d_color;
struct
{
gint32 x;

View File

@ -241,9 +241,7 @@ gimp_bucket_fill (gint32 drawable_ID,
/**
* gimp_by_color_select:
* @drawable_ID: The affected drawable.
* @red:
* @green:
* @blue: The color to select.
* @color: The color to select.
* @threshold: Threshold in intensity levels %%desc%%.
* @operation: The selection operation.
* @antialias: Antialiasing.
@ -271,25 +269,18 @@ gimp_bucket_fill (gint32 drawable_ID,
* Returns: TRUE on success.
*/
gboolean
gimp_by_color_select (gint32 drawable_ID,
guchar red,
guchar green,
guchar blue,
gint threshold,
GimpChannelOps operation,
gboolean antialias,
gboolean feather,
gdouble feather_radius,
gboolean sample_merged)
gimp_by_color_select (gint32 drawable_ID,
GimpRGB *color,
gint threshold,
GimpChannelOps operation,
gboolean antialias,
gboolean feather,
gdouble feather_radius,
gboolean sample_merged)
{
GimpParam *return_vals;
gint nreturn_vals;
gboolean success = TRUE;
guchar color[3];
color[0] = red;
color[1] = green;
color[2] = blue;
return_vals = gimp_run_procedure ("gimp_by_color_select",
&nreturn_vals,
@ -418,9 +409,7 @@ gimp_clone_default (gint32 drawable_ID,
* @sample_average: Average the color of all the pixels in a specified radius.
* @average_radius: The radius of pixels to average.
* @save_color: Save the color to the active palette.
* @red:
* @green:
* @blue: The return color.
* @color: The return color.
*
* Determine the color at the given drawable coordinates
*
@ -447,9 +436,7 @@ gimp_color_picker (gint32 image_ID,
gboolean sample_average,
gdouble average_radius,
gboolean save_color,
guchar *red,
guchar *green,
guchar *blue)
GimpRGB *color)
{
GimpParam *return_vals;
gint nreturn_vals;
@ -470,11 +457,7 @@ gimp_color_picker (gint32 image_ID,
success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
if (success)
{
*red = return_vals[1].data.d_color.red;
*green = return_vals[1].data.d_color.green;
*blue = return_vals[1].data.d_color.blue;
}
*color = return_vals[1].data.d_color;
gimp_destroy_params (return_vals, nreturn_vals);

View File

@ -61,9 +61,7 @@ gboolean gimp_bucket_fill (gint32 drawable_ID,
gdouble x,
gdouble y);
gboolean gimp_by_color_select (gint32 drawable_ID,
guchar red,
guchar green,
guchar blue,
GimpRGB *color,
gint threshold,
GimpChannelOps operation,
gboolean antialias,
@ -88,9 +86,7 @@ gboolean gimp_color_picker (gint32 image_ID,
gboolean sample_average,
gdouble average_radius,
gboolean save_color,
guchar *red,
guchar *green,
guchar *blue);
GimpRGB *color);
gboolean gimp_convolve (gint32 drawable_ID,
gdouble pressure,
GimpConvolveType convolve_type,

View File

@ -1092,13 +1092,15 @@ _gp_params_read (GIOChannel *channel,
break;
case GIMP_PDB_COLOR:
if (!wire_read_int8 (channel, (guint8*) &(*params)[i].data.d_color.red, 1))
if (!wire_read_double (channel, &(*params)[i].data.d_color.r, 1))
goto cleanup;
if (!wire_read_int8 (channel, (guint8*) &(*params)[i].data.d_color.green, 1))
if (!wire_read_double (channel, &(*params)[i].data.d_color.g, 1))
goto cleanup;
if (!wire_read_int8 (channel, (guint8*) &(*params)[i].data.d_color.blue, 1))
if (!wire_read_double (channel, &(*params)[i].data.d_color.b, 1))
goto cleanup;
break;
if (!wire_read_double (channel, &(*params)[i].data.d_color.a, 1))
goto cleanup;
break;
case GIMP_PDB_REGION:
break;
@ -1261,12 +1263,17 @@ _gp_params_write (GIOChannel *channel,
break;
case GIMP_PDB_COLOR:
if (!wire_write_int8 (channel, (guint8*) &params[i].data.d_color.red, 1))
return;
if (!wire_write_int8 (channel, (guint8*) &params[i].data.d_color.green, 1))
return;
if (!wire_write_int8 (channel, (guint8*) &params[i].data.d_color.blue, 1))
return;
{
GimpRGB *color = (GimpRGB *) &params[i].data.d_color;
if (!wire_write_double (channel, &color->r, 1))
return;
if (!wire_write_double (channel, &color->g, 1))
return;
if (!wire_write_double (channel, &color->b, 1))
return;
if (!wire_write_double (channel, &color->a, 1))
return;
}
break;
case GIMP_PDB_REGION:

View File

@ -1,21 +1,21 @@
/* LIBGIMP - The GIMP Library
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
*/
#ifndef __GIMP_PROTOCOL_H__
#define __GIMP_PROTOCOL_H__
@ -29,7 +29,7 @@ extern "C" {
/* Increment every time the protocol changes
*/
#define GP_VERSION 0x0004
#define GP_VERSION 0x0008
enum
@ -109,12 +109,7 @@ struct _GPParam
gint8 *d_int8array;
gdouble *d_floatarray;
gchar **d_stringarray;
struct
{
guint8 red;
guint8 green;
guint8 blue;
} d_color;
GimpRGB d_color;
struct
{
gint32 x;

View File

@ -31,7 +31,7 @@
#include "gimpcolorarea.h"
#include "gimpcolorbutton.h"
#include "libgimp/gimppalette.h"
#include "libgimp/gimppalette_pdb.h"
#include "libgimp/libgimp-intl.h"
@ -426,7 +426,7 @@ gimp_color_button_use_fg (gpointer callback_data,
g_return_if_fail (GIMP_IS_COLOR_BUTTON (callback_data));
gimp_color_button_get_color (GIMP_COLOR_BUTTON (callback_data), &color);
gimp_palette_get_foreground_rgb (&color);
gimp_palette_get_foreground (&color);
gimp_color_button_set_color (GIMP_COLOR_BUTTON (callback_data), &color);
}
@ -441,7 +441,7 @@ gimp_color_button_use_bg (gpointer callback_data,
g_return_if_fail (GIMP_IS_COLOR_BUTTON (callback_data));
gimp_color_button_get_color (GIMP_COLOR_BUTTON (callback_data), &color);
gimp_palette_get_background_rgb (&color);
gimp_palette_get_background (&color);
gimp_color_button_set_color (GIMP_COLOR_BUTTON (callback_data), &color);
}

View File

@ -260,10 +260,7 @@ run (gchar *name,
mapvals.env_mapped = (gint) param[6].data.d_int32;
mapvals.bumpmaptype = (gint) param[7].data.d_int32;
mapvals.lightsource.type = (LightType) param[8].data.d_int32;
gimp_rgb_set (&mapvals.lightsource.color,
param[9].data.d_color.red,
param[9].data.d_color.green,
param[9].data.d_color.blue);
mapvals.lightsource.color = param[9].data.d_color;
mapvals.lightsource.position.x = param[10].data.d_float;
mapvals.lightsource.position.y = param[11].data.d_float;
mapvals.lightsource.position.z = param[12].data.d_float;

View File

@ -204,7 +204,7 @@ blah (void)
gck_rgba_set(&background,0.0,0.0,0.0,0.0);
else
{
gimp_palette_get_background_rgb (&background);
gimp_palette_get_background (&background);
gimp_rgb_set_alpha (&background, 1.0);
}

View File

@ -377,7 +377,7 @@ image_setup (GimpDrawable *drawable,
}
else
{
gimp_palette_get_background_rgb (&background);
gimp_palette_get_background (&background);
gimp_rgb_set_alpha (&background, 1.0);
}

View File

@ -297,10 +297,7 @@ run (gchar *name,
mapvals.beta = param[17].data.d_float;
mapvals.gamma = param[18].data.d_float;
mapvals.lightsource.type = (LightType) param[19].data.d_int32;
gimp_rgb_set_uchar (&mapvals.lightsource.color,
param[20].data.d_color.red,
param[20].data.d_color.green,
param[20].data.d_color.blue);
mapvals.lightsource.color = param[20].data.d_color;
mapvals.lightsource.position.x = param[21].data.d_float;
mapvals.lightsource.position.y = param[22].data.d_float;
mapvals.lightsource.position.z = param[23].data.d_float;

View File

@ -196,7 +196,7 @@ compute_preview (gint x,
}
else
{
gimp_palette_get_background_rgb (&background);
gimp_palette_get_background (&background);
gimp_rgb_set_alpha (&background, 1.0);
}

View File

@ -261,7 +261,7 @@ drawlens (GimpDrawable *drawable)
guchar bgr_red, bgr_blue, bgr_green;
guchar alphaval;
gimp_palette_get_background_rgb (&background);
gimp_palette_get_background (&background);
gimp_rgb_get_uchar (&background,
&bgr_red, &bgr_green, &bgr_blue);

View File

@ -652,7 +652,7 @@ blinds_get_bg (guchar *bg)
{
GimpRGB background;
gimp_palette_get_background_rgb (&background);
gimp_palette_get_background (&background);
switch (gimp_drawable_type (blindsdrawable->id))
{

View File

@ -167,7 +167,7 @@ run (gchar *name,
if (run_mode != GIMP_RUN_NONINTERACTIVE)
{
gimp_palette_set_foreground_rgb (&result_color);
gimp_palette_set_foreground (&result_color);
}
if (run_mode == GIMP_RUN_INTERACTIVE)
{
@ -189,10 +189,7 @@ run (gchar *name,
values[0].data.d_status = status;
values[1].type = GIMP_PDB_COLOR;
gimp_rgb_get_uchar (&result_color,
&values[0].data.d_color.red,
&values[1].data.d_color.green,
&values[2].data.d_color.blue);
values[1].data.d_color = result_color;
gimp_drawable_detach (drawable);
}

View File

@ -208,8 +208,8 @@ check (GimpDrawable *drawable)
/* Get the foreground and background colors */
gimp_palette_get_foreground_rgb (&foreground);
gimp_palette_get_background_rgb (&background);
gimp_palette_get_foreground (&foreground);
gimp_palette_get_background (&background);
switch (gimp_drawable_type (drawable->id))
{

View File

@ -187,12 +187,7 @@ run (gchar *name,
status = GIMP_PDB_CALLING_ERROR;
if (status == GIMP_PDB_SUCCESS)
{
gimp_rgb_set_uchar (&cvals.color,
param[3].data.d_color.red,
param[3].data.d_color.green,
param[3].data.d_color.blue);
}
cvals.color = param[3].data.d_color;
break;
case GIMP_RUN_WITH_LAST_VALS:

View File

@ -157,7 +157,7 @@ run (gchar *name,
switch (run_mode)
{
case GIMP_RUN_INTERACTIVE:
gimp_palette_get_foreground_rgb (&pvals.color);
gimp_palette_get_foreground (&pvals.color);
gimp_get_data ("plug_in_colortoalpha", &pvals);
if (! colortoalpha_dialog (drawable ))
{
@ -169,13 +169,9 @@ run (gchar *name,
case GIMP_RUN_NONINTERACTIVE:
if (nparams != 3)
status = GIMP_PDB_CALLING_ERROR;
if (status == GIMP_PDB_SUCCESS)
{
gimp_rgb_set_uchar (&pvals.color,
param[3].data.d_color.red,
param[3].data.d_color.green,
param[3].data.d_color.blue);
}
pvals.color = param[3].data.d_color;
break;
case GIMP_RUN_WITH_LAST_VALS:

View File

@ -272,7 +272,7 @@ cubism (GimpDrawable *drawable)
}
else
{
gimp_palette_get_background_rgb (&background);
gimp_palette_get_background (&background);
switch (gimp_drawable_type (drawable->id))
{
case GIMP_RGBA_IMAGE:

View File

@ -187,7 +187,7 @@ run (gchar *name,
/* retrieve stored arguments (if any) */
gimp_get_data ("plug_in_exchange", &xargs);
/* initialize using foreground color */
gimp_palette_get_foreground_rgb (&xargs.from);
gimp_palette_get_foreground (&xargs.from);
if (! exchange_dialog ())
return;
@ -201,7 +201,7 @@ run (gchar *name,
* run with the current foreground as 'from'
* color, making ALT-F somewhat more useful.
*/
gimp_palette_get_foreground_rgb (&xargs.from);
gimp_palette_get_foreground (&xargs.from);
break;
case GIMP_RUN_NONINTERACTIVE:

View File

@ -304,18 +304,12 @@ run (gchar *name,
filmvals.keep_height = (param[3].data.d_int32 <= 0);
filmvals.film_height = (filmvals.keep_height ?
128 : param[3].data.d_int32);
gimp_rgb_set_uchar (&filmvals.film_color,
param[4].data.d_color.red,
param[4].data.d_color.green,
param[4].data.d_color.blue);
filmvals.film_color = param[4].data.d_color;
filmvals.number_start = param[5].data.d_int32;
k = sizeof (filmvals.number_fontf);
strncpy (filmvals.number_fontf, param[6].data.d_string, k);
filmvals.number_fontf[k-1] = '\0';
gimp_rgb_set_uchar (&filmvals.number_color,
param[7].data.d_color.red,
param[7].data.d_color.green,
param[7].data.d_color.blue);
filmvals.number_color = param[7].data.d_color;
filmvals.number_pos[0] = param[8].data.d_int32;
filmvals.number_pos[1] = param[9].data.d_int32;
filmvals.num_images = param[10].data.d_int32;
@ -398,7 +392,7 @@ film (void)
tile_height = gimp_tile_height ();
/* Save foreground colour */
gimp_palette_get_foreground_rgb (&foreground);
gimp_palette_get_foreground (&foreground);
if (filmvals.keep_height) /* Search maximum picture height */
{
@ -539,7 +533,7 @@ film (void)
if ((number_height > 0) &&
(filmvals.number_pos[0] || filmvals.number_pos[1]))
{
gimp_palette_set_foreground_rgb (&filmvals.number_color);
gimp_palette_set_foreground (&filmvals.number_color);
if (filmvals.number_pos[0])
draw_number (layer_ID_dst, filmvals.number_start + picture_count,
@ -551,7 +545,7 @@ film (void)
film_height - (hole_offset + number_height)/2,
number_height);
gimp_palette_set_foreground_rgb (&foreground);
gimp_palette_set_foreground (&foreground);
}
picture_x0 += picture_width + (picture_space/2);
@ -571,7 +565,7 @@ film (void)
gimp_floating_sel_anchor (gimp_image_floating_selection (image_ID_dst));
/* Restore foreground */
gimp_palette_set_foreground_rgb (&foreground);
gimp_palette_set_foreground (&foreground);
return image_ID_dst;
}

View File

@ -907,7 +907,7 @@ save_image (gchar *filename,
case GIMP_INDEXED_IMAGE:
cmap = gimp_image_get_cmap (image_ID, &colors);
gimp_palette_get_background_rgb (&background);
gimp_palette_get_background (&background);
gimp_rgb_get_uchar (&background, &bgred, &bggreen, &bgblue);
for (i = 0; i < colors; i++)

View File

@ -191,32 +191,32 @@ run (gchar *name,
if (status == GIMP_PDB_SUCCESS)
{
grid_cfg.hwidth = MAX (0, param[3].data.d_int32);
grid_cfg.hspace = MAX (1, param[4].data.d_int32);
grid_cfg.hoffset = MAX (0, param[5].data.d_int32);
gimp_rgba_set_uchar (&grid_cfg.hcolor,
param[6].data.d_color.red,
param[6].data.d_color.green,
param[6].data.d_color.blue,
param[7].data.d_int8);
grid_cfg.hwidth = MAX (0, param[3].data.d_int32);
grid_cfg.hspace = MAX (1, param[4].data.d_int32);
grid_cfg.hoffset = MAX (0, param[5].data.d_int32);
grid_cfg.hcolor = param[6].data.d_color;
grid_cfg.vwidth = MAX (0, param[8].data.d_int32);
grid_cfg.vspace = MAX (1, param[9].data.d_int32);
grid_cfg.voffset = MAX (0, param[10].data.d_int32);
gimp_rgba_set_uchar (&grid_cfg.vcolor,
param[11].data.d_color.red,
param[11].data.d_color.green,
param[11].data.d_color.blue,
param[12].data.d_int8);
/* FIXME: this used to be the alpha value
param[7].data.d_int8;
*/
grid_cfg.iwidth = MAX (0, param[13].data.d_int32);
grid_cfg.ispace = MAX (0, param[14].data.d_int32);
grid_cfg.ioffset = MAX (0, param[15].data.d_int32);
gimp_rgba_set_uchar (&grid_cfg.icolor,
param[16].data.d_color.red,
param[16].data.d_color.green,
param[16].data.d_color.blue,
param[17].data.d_int8);
grid_cfg.vwidth = MAX (0, param[8].data.d_int32);
grid_cfg.vspace = MAX (1, param[9].data.d_int32);
grid_cfg.voffset = MAX (0, param[10].data.d_int32);
grid_cfg.vcolor = param[11].data.d_color;
/* FIXME: this used to be the alpha value
param[12].data.d_int8;
*/
grid_cfg.iwidth = MAX (0, param[13].data.d_int32);
grid_cfg.ispace = MAX (0, param[14].data.d_int32);
grid_cfg.ioffset = MAX (0, param[15].data.d_int32);
grid_cfg.icolor = param[16].data.d_color;
/* FIXME: this used to be the alpha value
param[17].data.d_int8);
*/
}
}
else

View File

@ -425,8 +425,8 @@ run (gchar *name,
break;
}
gimp_palette_get_foreground_rgb (plvals.colors);
gimp_palette_get_background_rgb (plvals.colors + 1);
gimp_palette_get_foreground (plvals.colors);
gimp_palette_get_background (plvals.colors + 1);
gimp_rgb_set (plvals.colors + 2, 0.0, 0.0, 0.0);
gimp_rgb_set (plvals.colors + 3, 1.0, 1.0, 1.0);
@ -452,10 +452,7 @@ run (gchar *name,
for (j = 0; j < 4; j++)
{
gimp_rgb_set_uchar (plvals.colors + j,
param[3+j].data.d_color.red,
param[3+j].data.d_color.green,
param[3+j].data.d_color.blue);
plvals.colors[j] = param[3+j].data.d_color;
}
plvals.map_mode = param[7].data.d_int32;
}
@ -463,8 +460,8 @@ run (gchar *name,
{
gimp_get_data (name, &plvals);
gimp_palette_get_foreground_rgb (plvals.colors);
gimp_palette_get_background_rgb (plvals.colors + 1);
gimp_palette_get_foreground (plvals.colors);
gimp_palette_get_background (plvals.colors + 1);
if (!dialog (param[2].data.d_drawable))
break;

View File

@ -666,7 +666,7 @@ pixel_fetcher_set_bg_color (pixel_fetcher_t *pf)
{
GimpRGB background;
gimp_palette_get_background_rgb (&background);
gimp_palette_get_background (&background);
switch (pf->img_bpp)
{

View File

@ -481,8 +481,8 @@ mosaic (GimpDrawable *drawable)
back[0] = back[1] = back[2] = 0;
break;
case FG_BG:
gimp_palette_get_foreground_rgb (&foreground);
gimp_palette_get_background_rgb (&background);
gimp_palette_get_foreground (&foreground);
gimp_palette_get_background (&background);
switch (gimp_drawable_type (drawable->id))
{
case GIMP_RGB_IMAGE:

View File

@ -278,10 +278,7 @@ run (gchar *name,
{
pvals.xcenter = param[3].data.d_int32;
pvals.ycenter = param[4].data.d_int32;
gimp_rgb_set_uchar (&pvals.color,
param[5].data.d_color.red,
param[5].data.d_color.green,
param[5].data.d_color.blue);
pvals.color = param[5].data.d_color;
pvals.radius = param[6].data.d_int32;
pvals.nspoke = param[7].data.d_int32;
pvals.randomhue = param[8].data.d_int32;

View File

@ -707,7 +707,7 @@ filter (void)
break;
case BACKGROUND_TYPE_FOREGROUND:
gimp_palette_get_foreground_rgb (&color);
gimp_palette_get_foreground (&color);
gimp_rgb_get_uchar (&color, &pixel[0], &pixel[1], &pixel[2]);
pixel[3] = 255;
for (y = clear_y0; y < clear_y1; y++)
@ -724,7 +724,7 @@ filter (void)
break;
case BACKGROUND_TYPE_BACKGROUND:
gimp_palette_get_background_rgb (&color);
gimp_palette_get_background (&color);
gimp_rgb_get_uchar (&color, &pixel[0], &pixel[1], &pixel[2]);
pixel[3] = 255;
for (y = clear_y0; y < clear_y1; y++)
@ -885,19 +885,19 @@ plugin_run (gchar *name,
case GIMP_RUN_NONINTERACTIVE:
if (numof_params == 11)
{
p.params.tile_size = params[3].data.d_int32;
p.params.division_x = p.drawable->width / p.params.tile_size;
p.params.division_y = p.drawable->height / p.params.tile_size;
p.params.move_max_rate = params[4].data.d_float;
p.params.fractional_type = (FractionalType)params[5].data.d_int32;
p.params.wrap_around = params[6].data.d_int32;
p.params.centering = params[7].data.d_int32;
p.params.background_type = (BackgroundType)params[8].data.d_int32;
gimp_rgba_set_uchar (&p.params.background_color,
params[9].data.d_color.red,
params[9].data.d_color.green,
params[9].data.d_color.blue,
params[10].data.d_int32);
p.params.tile_size = params[3].data.d_int32;
p.params.division_x = p.drawable->width / p.params.tile_size;
p.params.division_y = p.drawable->height / p.params.tile_size;
p.params.move_max_rate = params[4].data.d_float;
p.params.fractional_type = (FractionalType)params[5].data.d_int32;
p.params.wrap_around = params[6].data.d_int32;
p.params.centering = params[7].data.d_int32;
p.params.background_type = (BackgroundType)params[8].data.d_int32;
p.params.background_color = params[9].data.d_color;
/* FIXME: this used to be the alpha value
params[10].data.d_int32
*/
p.run = TRUE;
}
else

View File

@ -858,7 +858,7 @@ save_image (gchar *filename, /* I - File to save to */
{
GimpRGB color;
gimp_palette_get_background_rgb (&color);
gimp_palette_get_background (&color);
gimp_rgb_get_uchar (&color, &red, &green, &blue);
background.index = 0;
@ -1017,7 +1017,7 @@ static void respin_cmap (png_structp pp, png_infop info, gint32 image_ID) {
/* Apps with no natural background will use this instead, see
elsewhere for the bKGD chunk being written to use index 0 */
gimp_palette_get_background_rgb (&color);
gimp_palette_get_background (&color);
gimp_rgb_get_uchar (&color, after+0, after+1, after+2);
/* One transparent palette entry, alpha == 0 */

View File

@ -741,7 +741,7 @@ pixel_fetcher_set_bg_color (pixel_fetcher_t *pf)
{
GimpRGB background;
gimp_palette_get_background_rgb (&background);
gimp_palette_get_background (&background);
switch (pf->img_bpp)
{
@ -1066,7 +1066,7 @@ dialog_update_preview (void)
guchar outside[4];
GimpRGB background;
gimp_palette_get_background_rgb (&background);
gimp_palette_get_background (&background);
switch (img_bpp)
{

View File

@ -1589,8 +1589,9 @@ void extract_data_and_channels(guchar* src, gint gimpstep, gint psstep,
int pix, chan;
gint32 channel_ID;
GimpDrawable* chdrawable;
guchar colour[3]= {0, 0, 0};
GimpRGB colour;
gimp_rgb_set (&colour, 0.0, 0.0, 0.0);
for (chan=gimpstep; chan<psstep; chan++)
{
@ -1603,7 +1604,7 @@ void extract_data_and_channels(guchar* src, gint gimpstep, gint psstep,
channel_ID = gimp_channel_new(image_ID,
psd_image.aux_channel[chan-gimpstep].name ? psd_image.aux_channel[chan-gimpstep].name : _("Unnamed channel"),
width, height,
100.0, colour);
100.0, &colour);
gimp_image_add_channel(image_ID, channel_ID, 0);
gimp_channel_set_visible(channel_ID, FALSE);
@ -1640,7 +1641,9 @@ void extract_channels(guchar* src, gint num_wanted, gint psstep,
int pix, chan;
gint32 channel_ID;
GimpDrawable* chdrawable;
guchar colour[3]= {0, 0, 0};
GimpRGB colour;
gimp_rgb_set (&colour, 0.0, 0.0, 0.0);
for (chan=psstep-num_wanted; chan<psstep; chan++)
{
@ -1653,7 +1656,7 @@ void extract_channels(guchar* src, gint num_wanted, gint psstep,
channel_ID = gimp_channel_new(image_ID,
psd_image.aux_channel[chan-(psstep-num_wanted)].name ? psd_image.aux_channel[chan-(psstep-num_wanted)].name : "Unnamed channel",
width, height,
100.0, colour);
100.0, &colour);
gimp_image_add_channel(image_ID, channel_ID, 0);
gimp_channel_set_visible(channel_ID, FALSE);

View File

@ -182,7 +182,7 @@ semiflatten (GimpDrawable *drawable)
gint x1, y1, x2, y2;
/* Fetch the GIMP current background colour, to semi-flatten against */
gimp_palette_get_background_rgb (&background);
gimp_palette_get_background (&background);
gimp_rgb_get_uchar (&background, &bgred, &bggreen, &bgblue);
/* Get the input area. This is the bounding box of the selection in

View File

@ -1216,14 +1216,8 @@ run (gchar *name,
svals.tiling = param[7].data.d_int32;
svals.perturbation = param[8].data.d_int32;
svals.colors = param[9].data.d_int32;
gimp_rgb_set_uchar (&svals.col1,
param[10].data.d_color.red,
param[10].data.d_color.green,
param[10].data.d_color.blue);
gimp_rgb_set_uchar (&svals.col2,
param[11].data.d_color.red,
param[11].data.d_color.green,
param[11].data.d_color.blue);
svals.col1 = param[10].data.d_color;
svals.col2 = param[11].data.d_color;
gimp_rgb_set_alpha (&svals.col1, param[12].data.d_float);
gimp_rgb_set_alpha (&svals.col2, param[13].data.d_float);
svals.colorization = param[14].data.d_int32;
@ -1349,8 +1343,8 @@ prepare_coef (params *p)
gimp_rgb_set (&color2, 0.0, 0.0, 0.0);
break;
case USE_FG_BG:
gimp_palette_get_background_rgb (&color1);
gimp_palette_get_foreground_rgb (&color2);
gimp_palette_get_background (&color1);
gimp_palette_get_foreground (&color2);
break;
}
}

View File

@ -901,12 +901,12 @@ fspike (GimpPixelRgn *src_rgn,
break;
case FOREGROUND:
gimp_palette_get_foreground_rgb (&gimp_color);
gimp_palette_get_foreground (&gimp_color);
gimp_rgb_get_uchar (&gimp_color, &pixel[0], &pixel[1], &pixel[2]);
break;
case BACKGROUND:
gimp_palette_get_background_rgb (&gimp_color);
gimp_palette_get_background (&gimp_color);
gimp_rgb_get_uchar (&gimp_color, &pixel[0], &pixel[1], &pixel[2]);
break;
}

View File

@ -426,7 +426,7 @@ load_image (gchar *filename)
channel_data *channel= NULL;
gushort *redmap, *greenmap, *bluemap;
guchar colors[3]= {0, 0, 0};
GimpRGB color;
guchar cmap[768];
gint i, j, worst_case = 0;
@ -442,6 +442,8 @@ load_image (gchar *filename)
guchar *icc_profile;
#endif
gimp_rgb_set (&color, 0.0, 0.0, 0.0);
TIFFSetWarningHandler (tiff_warning);
TIFFSetErrorHandler (tiff_error);
@ -687,7 +689,7 @@ load_image (gchar *filename)
/* Add alpha channels as appropriate */
for (i= 1; i <= extra; ++i) {
channel[i].ID= gimp_channel_new(image, _("TIFF Channel"), cols, rows,
100.0, colors);
100.0, &color);
gimp_image_add_channel(image, channel[i].ID, 0);
channel[i].drawable= gimp_drawable_get (channel[i].ID);
}

View File

@ -364,7 +364,7 @@ value_propagate_body (gint drawable_id)
best = g_new (guchar, bytes);
gimp_progress_init (_("Value propagating..."));
gimp_palette_get_foreground_rgb (&foreground);
gimp_palette_get_foreground (&foreground);
gimp_rgb_get_uchar (&foreground, fore+0, fore+1, fore+2);
/* start real job */
@ -818,7 +818,7 @@ initialize_foreground (GimpImageBaseType image_type,
{
*tmp = (void *) g_new (guchar, 3);
ch = (guchar *)*tmp;
gimp_palette_get_foreground_rgb (&foreground);
gimp_palette_get_foreground (&foreground);
gimp_rgb_get_uchar (&foreground, &ch[0], &ch[1], &ch[2]);
}
}
@ -837,7 +837,7 @@ initialize_background (GimpImageBaseType image_type,
{
*tmp = (void *) g_new (guchar, 3);
ch = (guchar *)*tmp;
gimp_palette_get_background_rgb (&background);
gimp_palette_get_background (&background);
gimp_rgb_get_uchar (&background, &ch[0], &ch[1], &ch[2]);
}
}

View File

@ -305,7 +305,7 @@ run (gchar *name,
tile_height = gimp_tile_height();
/* get currently selected foreground pixel color */
gimp_palette_get_foreground_rgb (&color);
gimp_palette_get_foreground (&color);
gimp_rgb_get_uchar (&color,
&color_pixel[0],
&color_pixel[1],

View File

@ -628,7 +628,7 @@ pixel_fetcher_set_bg_color (pixel_fetcher_t *pf)
{
GimpRGB background;
gimp_palette_get_background_rgb (&background);
gimp_palette_get_background (&background);
switch (pf->img_bpp)
{
@ -911,7 +911,7 @@ dialog_update_preview (void)
guchar outside[4];
GimpRGB background;
gimp_palette_get_background_rgb (&background);
gimp_palette_get_background (&background);
switch (img_bpp)
{

View File

@ -419,7 +419,7 @@ static void p_delta_LightSettings(t_LightSettings *val, t_LightSettings *val_fro
#include "iter_ALT/mod/plug_in_depth_merge_iter_ALT.inc"
#include "iter_ALT/mod/plug_in_despeckle_iter_ALT.inc"
#include "iter_ALT/mod/plug_in_emboss_iter_ALT.inc"
#include "iter_ALT/mod/plug_in_exchange_iter_ALT.inc"
/* #include "iter_ALT/mod/plug_in_exchange_iter_ALT.inc" */
#include "iter_ALT/mod/plug_in_flame_iter_ALT.inc"
#include "iter_ALT/mod/plug_in_lighting_iter_ALT.inc"
#include "iter_ALT/mod/plug_in_map_object_iter_ALT.inc"
@ -555,7 +555,7 @@ static t_iter_ALT_tab g_iter_ALT_tab[] =
, { "plug_in_emboss", p_plug_in_emboss_iter_ALT }
, { "plug_in_encript", p_plug_in_encript_iter_ALT }
, { "plug_in_engrave", p_plug_in_engrave_iter_ALT }
, { "plug_in_exchange", p_plug_in_exchange_iter_ALT }
/* , { "plug_in_exchange", p_plug_in_exchange_iter_ALT } */
/*, { "plug_in_export_palette", p_plug_in_export_palette_iter_ALT } */
, { "plug_in_figures", p_plug_in_figures_iter_ALT }
/*, { "plug_in_film", p_plug_in_film_iter_ALT } */

View File

@ -2395,7 +2395,7 @@ mov_path_prevw_draw ( t_mov_path_preview *path_ptr, gint update )
gtk_widget_draw(path_ptr->preview, NULL);
}
gimp_palette_get_foreground_rgb (&foreground);
gimp_palette_get_foreground (&foreground);
gimp_rgb_get_uchar (&foreground, &l_red, &l_green, &l_blue);
fg.pixel = gdk_rgb_xpixel_from_rgb ((l_red << 16) | (l_green << 8) | l_blue);

View File

@ -175,10 +175,7 @@ gdt_run (gchar *name,
gdtvals.alignment = param[5].data.d_int32;
gdtvals.rotation = param[6].data.d_int32;
gdtvals.line_spacing = param[7].data.d_int32;
gimp_rgb_set_uchar (&gdtvals.color,
param[8].data.d_color.red,
param[8].data.d_color.green,
param[8].data.d_color.blue);
gdtvals.color = param[8].data.d_color;
gdtvals.layer_alignment = param[9].data.d_int32;
strncpy(gdtvals.xlfd, param[10].data.d_string, sizeof(gdtvals.xlfd));
}
@ -239,7 +236,7 @@ gdt_load (GdtVals *data)
strcpy (data->text, "");
strcpy (data->xlfd, "");
gimp_palette_get_foreground_rgb (&data->color);
gimp_palette_get_foreground (&data->color);
data->antialias = TRUE;
data->alignment = LEFT;
@ -471,10 +468,10 @@ gdt_render_text_p (GdtVals *data,
gimp_drawable_offsets (data->layer_id, &layer_ox, &layer_oy);
/* get foreground color */
gimp_palette_get_foreground_rgb (&old_color);
gimp_palette_get_foreground (&old_color);
/* set foreground color to the wanted text color */
gimp_palette_set_foreground_rgb (&data->color);
gimp_palette_set_foreground (&data->color);
/* write text */
for (i = 0; text_lines[i]; i++)
@ -519,7 +516,7 @@ gdt_render_text_p (GdtVals *data,
g_free (text_lines_w);
/* set foreground color to the old one */
gimp_palette_set_foreground_rgb (&old_color);
gimp_palette_set_foreground (&old_color);
/* apply rotation */
if (data->rotation != 0 && abs(data->rotation) != 360)

View File

@ -2589,15 +2589,15 @@ gfig_gen_brush_preview (BrushDesc *bdesc)
* restore colours
*/
gimp_palette_get_foreground_rgb (&foreground);
gimp_palette_get_background_rgb (&background);
gimp_palette_get_foreground (&foreground);
gimp_palette_get_background (&background);
saved_bname = mygimp_brush_get ();
gimp_rgba_set (&color, 1.0, 1.0, 1.0, 1.0);
gimp_palette_set_background_rgb (&color);
gimp_palette_set_background (&color);
gimp_rgba_set (&color, 0.0, 0.0, 0.0, 1.0);
gimp_palette_set_foreground_rgb (&color);
gimp_palette_set_foreground (&color);
mygimp_brush_set (bdesc->bname);
@ -2617,8 +2617,8 @@ gfig_gen_brush_preview (BrushDesc *bdesc)
layer_ID,
2, line_pnts);
gimp_palette_set_background_rgb (&background);
gimp_palette_set_foreground_rgb (&foreground);
gimp_palette_set_background (&background);
gimp_palette_set_foreground (&foreground);
mygimp_brush_set (saved_bname);

View File

@ -630,7 +630,7 @@ save_image (gchar *filename,
to_frame = nframes;
}
gimp_palette_get_background_rgb (&background);
gimp_palette_get_background (&background);
gimp_rgb_get_uchar (&background, &red, &green, &blue);
switch (gimp_image_base_type (image_id))

View File

@ -1345,11 +1345,11 @@ ifs_compose (GimpDrawable *drawable)
if (band_height > height)
band_height = height;
mask = g_new(guchar,width*band_height*SQR(ifsvals.subdivide));
data = g_new(guchar,width*band_height*SQR(ifsvals.subdivide)*3);
nhits = g_new(guchar,width*band_height*SQR(ifsvals.subdivide));
mask = g_new (guchar, width * band_height * SQR (ifsvals.subdivide));
data = g_new (guchar, width * band_height * SQR (ifsvals.subdivide) * 3);
nhits = g_new (guchar, width * band_height * SQR (ifsvals.subdivide));
gimp_palette_get_background_rgb (&color);
gimp_palette_get_background (&color);
gimp_rgb_get_uchar (&color, &rc, &gc, &bc);
band_y = 0;
@ -2434,7 +2434,7 @@ ifs_compose_set_defaults (void)
gint i;
GimpRGB color;
gimp_palette_get_foreground_rgb (&color);
gimp_palette_get_foreground (&color);
ifsvals.aspect_ratio = (gdouble)ifsD->drawable_height/ifsD->drawable_width;
@ -2519,7 +2519,7 @@ ifs_compose_new_callback (GtkWidget *widget,
undo_begin();
gimp_palette_get_foreground_rgb (&color);
gimp_palette_get_foreground (&color);
elem = aff_element_new (0.5, 0.5 * height / width, &color,
++count_for_naming);
@ -2645,13 +2645,13 @@ ifs_compose_preview_callback (GtkWidget *widget,
GimpRGB color;
if (!ifsD->preview_data)
ifsD->preview_data = g_new(guchar,3*width*height);
ifsD->preview_data = g_new (guchar, 3 * width * height);
gimp_palette_get_background_rgb (&color);
gimp_palette_get_background (&color);
gimp_rgb_get_uchar (&color, &rc, &gc, &bc);
ptr = ifsD->preview_data;
for (i=0;i<width*height;i++)
for (i=0; i < width * height; i++)
{
*ptr++ = rc;
*ptr++ = gc;

View File

@ -53,8 +53,8 @@ get_colors (GimpDrawable *drawable,
GimpRGB foreground;
GimpRGB background;
gimp_palette_get_foreground_rgb (&foreground);
gimp_palette_get_background_rgb (&background);
gimp_palette_get_foreground (&foreground);
gimp_palette_get_background (&background);
fg[0] = fg[1] = fg[2] = fg[3] = 255;
bg[0] = bg[1] = bg[2] = bg[3] = 255;

View File

@ -481,8 +481,8 @@ mosaic (GimpDrawable *drawable)
back[0] = back[1] = back[2] = 0;
break;
case FG_BG:
gimp_palette_get_foreground_rgb (&foreground);
gimp_palette_get_background_rgb (&background);
gimp_palette_get_foreground (&foreground);
gimp_palette_get_background (&background);
switch (gimp_drawable_type (drawable->id))
{
case GIMP_RGB_IMAGE:

View File

@ -800,10 +800,10 @@ init_calculation (void)
/* Colors */
gimp_palette_get_foreground_rgb (&color);
gimp_palette_get_foreground (&color);
gimp_rgb_get_uchar (&color, &fore_color[0], &fore_color[1], &fore_color[2]);
gimp_palette_get_background_rgb (&color);
gimp_palette_get_background (&color);
gimp_rgb_get_uchar (&color, &back_color[0], &back_color[1], &back_color[2]);
}

View File

@ -887,6 +887,7 @@ script_fu_script_proc (gchar *name,
status = GIMP_PDB_CALLING_ERROR;
if (status == GIMP_PDB_SUCCESS)
{
guchar color[3];
gchar *text = NULL;
gchar *command;
gchar *c;
@ -965,10 +966,10 @@ script_fu_script_proc (gchar *name,
break;
case SF_COLOR:
gimp_rgb_get_uchar (&params[i + 1].data.d_color,
color, color + 1, color + 2);
g_snprintf (buffer, sizeof (buffer), "'(%d %d %d)",
params[i + 1].data.d_color.red,
params[i + 1].data.d_color.green,
params[i + 1].data.d_color.blue);
color[0], color[1], color[2]);
text = buffer;
break;

View File

@ -887,6 +887,7 @@ script_fu_script_proc (gchar *name,
status = GIMP_PDB_CALLING_ERROR;
if (status == GIMP_PDB_SUCCESS)
{
guchar color[3];
gchar *text = NULL;
gchar *command;
gchar *c;
@ -965,10 +966,10 @@ script_fu_script_proc (gchar *name,
break;
case SF_COLOR:
gimp_rgb_get_uchar (&params[i + 1].data.d_color,
color, color + 1, color + 2);
g_snprintf (buffer, sizeof (buffer), "'(%d %d %d)",
params[i + 1].data.d_color.red,
params[i + 1].data.d_color.green,
params[i + 1].data.d_color.blue);
color[0], color[1], color[2]);
text = buffer;
break;

View File

@ -697,13 +697,16 @@ marshall_proc_db_call (LISP a)
success = FALSE;
if (success)
{
guchar color[3];
args[i].type = GIMP_PDB_COLOR;
color_list = car (a);
args[i].data.d_color.red = get_c_long (car (color_list));
color_list = cdr (color_list);
args[i].data.d_color.green = get_c_long (car (color_list));
color_list = cdr (color_list);
args[i].data.d_color.blue = get_c_long (car (color_list));
color[0] = get_c_long (car (color_list));
color[1] = get_c_long (car (color_list));
color[2] = get_c_long (car (color_list));
gimp_rgb_set_uchar (&args[i].data.d_color,
color[0], color[1], color[2]);
}
break;
@ -951,12 +954,16 @@ marshall_proc_db_call (LISP a)
break;
case GIMP_PDB_COLOR:
intermediate_val = cons (flocons ((int) values[i + 1].data.d_color.red),
cons (flocons ((int) values[i + 1].data.d_color.green),
cons (flocons ((int) values[i + 1].data.d_color.blue),
NIL)));
return_val = cons (intermediate_val, return_val);
break;
{
guchar color[3];
gimp_rgb_get_uchar (&values[i + 1].data.d_color, color, color + 1, color + 2);
intermediate_val = cons (flocons ((int) color[0]),
cons (flocons ((int) color[1]),
cons (flocons ((int) color[2]),
NIL)));
return_val = cons (intermediate_val, return_val);
break;
}
case GIMP_PDB_REGION:
return my_err ("Regions are currently unsupported as return values", NIL);

View File

@ -1429,6 +1429,7 @@ p_write_channel_prp(gchar *dirname,
{
t_param_prop l_param;
gint l_ofsx, l_ofsy;
GimpRGB color;
guchar l_r, l_g, l_b;
fprintf(fp, "%s", channel_shortname);
@ -1452,7 +1453,8 @@ p_write_channel_prp(gchar *dirname,
l_param.int_val1 = gimp_channel_get_show_masked(channel_id);
p_write_prop (fp, PROP_SHOW_MASKED, &l_param, wr_all_prp);
gimp_channel_get_color(channel_id, &l_r, &l_g, &l_b);
gimp_channel_get_color(channel_id, &color);
gimp_rgb_get_uchar (&color, &l_r, &l_g, &l_b);
l_param.int_val1 = l_r;
l_param.int_val2 = l_g;
l_param.int_val3 = l_b;
@ -3430,13 +3432,13 @@ load_xjt_image (gchar *filename)
/* load should overwrite the layer_mask with data from jpeg file */
l_channel_id = xjpg_load_channel (l_jpg_file,
l_image_id,
l_channel_id,
l_channel_prp_ptr->name,
l_channel_prp_ptr->opacity,
l_channel_prp_ptr->color_r,
l_channel_prp_ptr->color_g,
l_channel_prp_ptr->color_b);
l_image_id,
l_channel_id,
l_channel_prp_ptr->name,
l_channel_prp_ptr->opacity,
l_channel_prp_ptr->color_r,
l_channel_prp_ptr->color_g,
l_channel_prp_ptr->color_b);
g_free(l_jpg_file);
if(l_channel_id >= 0)
{

View File

@ -80,11 +80,6 @@ sub generate {
my $funcname = "gimp_$name"; my $wrapped = ""; my %usednames;
my $retdesc = "";
# The 'color' argument is special cased to accept and return the
# individual color components. This is to maintain backwards
# compatibility, but it certainly won't fly for other color models
# It also makes the code a bit messier.
# Find the return argument (defaults to the first arg if not
# explicity set
my $retarg = undef; $retvoid = 0;
@ -101,17 +96,10 @@ sub generate {
}
}
my $rettype; my $retcol = 0;
my $rettype;
if ($retarg) {
my ($type) = &arg_parse($retarg->{type});
if ($type ne 'color') {
$rettype = &libtype($retarg);
chop $rettype unless $rettype =~ /\*$/;
}
else {
# Color returns three components in pointers passed in
$rettype = 'void'; $retcol = 1;
}
$rettype = &libtype($retarg);
chop $rettype unless $rettype =~ /\*$/;
$retarg->{retval} = 1;
@ -123,7 +111,7 @@ sub generate {
}
# The parameters to the function
my $arglist = ""; my $argpass = ""; my $color = ""; my $privatevars = 0;
my $arglist = ""; my $argpass = ""; my $privatevars = 0;
my $argdesc = "";
foreach (@inargs) {
my ($type) = &arg_parse($_->{type});
@ -138,7 +126,7 @@ sub generate {
if (exists $_->{implicit_fill}) {
$privatevars++;
}
elsif ($type ne 'color') {
else {
$arglist .= &libtype($_);
$arglist .= $_->{name};
$arglist .= '_ID' if $id;
@ -148,21 +136,6 @@ sub generate {
$argdesc .= '_ID' if $id;
$argdesc .= ": $desc";
}
else {
# A color needs to stick the components into a 3-element array
chop ($color = <<CODE);
guchar $_->{name}\[3];
$_->{name}\[0] = red;
$_->{name}\[1] = green;
$_->{name}\[2] = blue;
CODE
$arglist .= "guchar red, guchar green, guchar blue, ";
$argdesc .= " * \@red:\n * \@green:\n * \@blue: $desc";
}
# This is what's passed into gimp_run_procedure
$argpass .= "\n\t\t\t\t" . ' ' x 4;
@ -193,7 +166,7 @@ CODE
}
# We only need to bother with this if we have to return a value
if ($rettype ne 'void' || $retcol || $retvoid) {
if ($rettype ne 'void' || $retvoid) {
my $once = 0;
my $firstvar;
my @initnums;
@ -216,7 +189,7 @@ CODE
push @initnums, $_;
}
}
elsif (exists $_->{retval} && $type ne 'color') {
elsif (exists $_->{retval}) {
$return_args .= "\n" . ' ' x 2;
$return_args .= &libtype($_);
@ -254,7 +227,7 @@ CODE
}
}
elsif ($retvoid) {
push @initnums, $_;
push @initnums, $_ unless exists $arg->{struct};
}
}
@ -352,14 +325,15 @@ CP1
$numvar * sizeof ($datatype));
CP2
}
elsif ($type ne 'color') {
else {
# The return value variable
$var = "";
unless (exists $_->{retval}) {
$var .= '*';
$arglist .= &libtype($_);
$arglist .= "*$_->{libname}";
$arglist .= '*' unless exists $arg->{struct};
$arglist .= "$_->{libname}";
$arglist .= '_ID' if $id;
$arglist .= ', ';
@ -377,18 +351,6 @@ CP2
$var = ${ch}return_vals[$argc].data.d_$type${cf};
CODE
}
else {
# Colors are returned in parts using pointers
$arglist .= "guchar \*red, guchar \*green, guchar \*blue, ";
$return_marshal .= <<CODE;
{
\*red = return_vals[$argc].data.d_color.red;
\*green = return_vals[$argc].data.d_color.green;
\*blue = return_vals[$argc].data.d_color.blue;
}
CODE
$argdesc .= " * \@red:\n * \@green:\n * \@blue: $desc";
}
if ($argdesc) {
unless ($argdesc =~ /[\.\!\?]$/) { $argdesc .= '.' }
@ -404,7 +366,7 @@ CODE
gimp_destroy_params (return_vals, nreturn_vals);
CODE
unless ($retcol || $retvoid) {
unless ($retvoid) {
$return_marshal .= ' ' x 2 . "return $firstvar;";
}
else {
@ -484,7 +446,7 @@ $rettype
$wrapped$funcname ($clist)
{
GimpParam *return_vals;
gint nreturn_vals;$return_args$color
gint nreturn_vals;$return_args
return_vals = gimp_run_procedure ("$funcname",
\&nreturn_vals,$argpass

View File

@ -31,7 +31,7 @@ package Gimp::CodeGen::pdb;
floatarray => { name => 'FLOATARRAY' , type => 'gdouble *', array => 1 },
stringarray => { name => 'STRINGARRAY', type => 'gchar **' , array => 1 },
color => { name => 'COLOR' , type => 'guchar *' },
color => { name => 'COLOR' , type => 'GimpRGB *', struct => 1 },
display => { name => 'DISPLAY',
type => 'GDisplay *',

View File

@ -51,12 +51,8 @@ sub channel_get_prop_proc {
$invoke{code} = <<'CODE'
{
color = g_new (guchar, 3);
gimp_rgb_get_uchar (&channel->color,
&color[RED_PIX],
&color[GREEN_PIX],
&color[BLUE_PIX]);
color = g_new (GimpRGB, 1);
*color = channel->color;
}
CODE
}
@ -88,14 +84,9 @@ sub channel_set_prop_proc {
%invoke = (
code => <<'CODE'
{
GimpRGB rgb_color;
gimp_rgba_set_uchar (&rgb_color,
color[0],
color[1],
color[2],
(guchar) (channel->color.a * 255.999));
GimpRGB rgb_color = *color;
rgb_color.a = channel->color.a;
channel_set_color(channel, &rgb_color);
}
CODE
@ -155,7 +146,8 @@ HELP
{ name => 'opacity', type => '0 <= float <= 100',
desc => 'The channel opacity: (%%desc%%)' },
{ name => 'color', type => 'color',
desc => 'The channel compositing color' }
desc => 'The channel compositing color'
}
);
$inargs[0]->{desc} .= ' to which to add the channel';
@ -167,13 +159,9 @@ HELP
%invoke = (
code => <<'CODE'
{
GimpRGB rgb_color;
gimp_rgb_set_uchar (&rgb_color,
color[0], color[1], color[2]);
GimpRGB rgb_color = *color;
rgb_color.a = opacity / 100.0;
channel = channel_new (gimage, width, height, name, &rgb_color);
success = channel != NULL;
}
@ -242,7 +230,8 @@ CODE
'$invoke{code} =~
s%(color.a);$%(($1 / 100.0);%' ]);
&channel_accessors('color', 'color', 'compositing color', 0);
&channel_accessors('color', 'color', 'compositing color', 0,
[ '$outargs[0]->{void_ret} = 1' ]);
&channel_accessors('tattoo', 'tattoo', 'tattoo', 1,
<<'CODE');

Some files were not shown because too many files have changed in this diff Show More