API-mega-break-it-all patch part one: removed the unnecessary PDB_IMAGE

* airbrush.c, blend.c, brightness_contrast.c, bucket_fill.c
        by_color_select.c, channel_ops.c, clone.c, color_balance.c
        color_picker.c, convolve.c, curves.c, desaturate.c, edit_cmds.c
        equalize.c, eraser.c, flip_tool.c, fuzzy_select.c,
        gimage_mask_cmds.c histogram_tool.c, hue_saturation.c, invert.c,
        levels.c, pencil.c paintbrush.c, perspective_tool.c, posterize.c,
        rotate_tool.c scale_tool.c, shear_tool.c, text_tool.c, threshold.c:

        API-mega-break-it-all patch part one: removed the unnecessary
        PDB_IMAGE argument from many functions.

Affected functions:
gimp_airbrush gimp_blend gimp_brightness_contrast gimp_bucket_fill
gimp_by_color_select gimp_channel_ops_offset gimp_clone gimp_color_balance
gimp_color_picker gimp_convolve gimp_curves_explicit gimp_curves_spline
gimp_desaturate gimp_edit_clear gimp_edit_copy gimp_edit_cut gimp_edit_fill
gimp_edit_paste gimp_edit_stroke gimp_equalize gimp_eraser
gimp_eraser_extended gimp_flip gimp_fuzzy_select gimp_histogram
gimp_hue_saturation gimp_invert gimp_levels gimp_paintbrush
gimp_paintbrush_extended gimp_pencil gimp_perspective gimp_posterize
gimp_rotate gimp_scale gimp_selection_float gimp_selection_layer_alpha
gimp_selection_load gimp_shear gimp_threshold
This commit is contained in:
Marc Lehmann 1998-11-13 20:40:00 +00:00
parent 84352d4079
commit 42e2c63ce5
100 changed files with 1113 additions and 2158 deletions

View File

@ -1,3 +1,18 @@
Fri Nov 13 16:48:10 CET 1998 Marc Lehmann <pcg@goof.com>
* app/airbrush.c, app/blend.c, app/brightness_contrast.c,
app/bucket_fill.c by_color_select.c, app/channel_ops.c, app/clone.c,
app/color_balance.c color_picker.c, app/convolve.c, app/curves.c,
app/desaturate.c, app/edit_cmds.c equalize.c, app/eraser.c,
app/flip_tool.c, app/fuzzy_select.c, gimage_mask_cmds.c
app/histogram_tool.c, app/hue_saturation.c, app/invert.c, levels.c,
app/pencil.c app/paintbrush.c, app/perspective_tool.c,
app/posterize.c, rotate_tool.c app/scale_tool.c, app/shear_tool.c,
app/text_tool.c, app/threshold.c:
API-mega-break-it-all patch part one: removed the unnecessary
PDB_IMAGE argument from many functions.
1998-11-12 Jay Cox <jaycox@earthlink.net>
* app/drawable_cmds.c, app/gimage_cmds.c
@ -17,7 +32,7 @@ Wed Nov 11 02:27:46 CET 1998 Marc Lehmann <pcg@goof.com>
* libgimp/gimp.c (gimp_run_procedure2): fixed a memory leak,
(gimp_destroy_paramdefs) new function.
* libgimp/gimp.h (gimp_destroy_paramdefs): added header.
* libgimp/gimp.h (gimp_destroy_paramdefs): added prototype.
* libgimp/gimpfeatures.h.in (GIMP_HAVE_DESTROY_PARAMDEFS): new macro.
* plug-ins/script-fu/script-fu.c (init_procedures): fixed a
big memory leak (this also applied to perl!)
@ -64,7 +79,7 @@ Sun Nov 8 17:51:52 PST 1998 Manish Singh <yosh@gimp.org>
* libgimp/{gimp.h, gimpchannel.c, gimpdrawable.c, gimplayer.c}:
export the tattoo functions to the plug-ins
* libimp/gserialize.c, libimp/gserialize.h: new files for
* libgimp/gserialize.c, libgimp/gserialize.h: new files for
serializing structures
* main.c: test the gserialize functions

View File

@ -295,10 +295,6 @@ airbrush_non_gui_paint_func (PaintCore *paint_core,
/* The airbrush procedure definition */
ProcArg airbrush_args[] =
{
{ PDB_IMAGE,
"image",
N_("the image")
},
{ PDB_DRAWABLE,
"drawable",
N_("the drawable")
@ -329,7 +325,7 @@ ProcRecord airbrush_proc =
PDB_INTERNAL,
/* Input arguments */
5,
4,
airbrush_args,
/* Output arguments */
@ -356,25 +352,20 @@ airbrush_invoker (Argument *args)
drawable = NULL;
num_strokes = 0;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* pressure */
if (success)
{
fp_value = args[2].value.pdb_float;
fp_value = args[1].value.pdb_float;
if (fp_value >= 0.0 && fp_value <= 100.0)
non_gui_pressure = fp_value;
else
@ -383,7 +374,7 @@ airbrush_invoker (Argument *args)
/* num strokes */
if (success)
{
int_value = args[3].value.pdb_int;
int_value = args[2].value.pdb_int;
if (int_value > 0)
num_strokes = int_value / 2;
else
@ -392,7 +383,7 @@ airbrush_invoker (Argument *args)
/* point array */
if (success)
stroke_array = (double *) args[4].value.pdb_pointer;
stroke_array = (double *) args[3].value.pdb_pointer;
if (success)
/* init the paint core */

View File

@ -877,10 +877,6 @@ color_balance_yb_text_update (GtkWidget *w,
/* The color_balance procedure definition */
ProcArg color_balance_args[] =
{
{ PDB_IMAGE,
"image",
N_("the image")
},
{ PDB_DRAWABLE,
"drawable",
N_("the drawable")
@ -918,7 +914,7 @@ ProcRecord color_balance_proc =
PDB_INTERNAL,
/* Input arguments */
7,
6,
color_balance_args,
/* Output arguments */
@ -955,20 +951,15 @@ color_balance_invoker (Argument *args)
magenta_green = 0;
yellow_blue = 0;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
success = FALSE;
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* make sure the drawable is not indexed color */
if (success)
@ -977,7 +968,7 @@ color_balance_invoker (Argument *args)
/* transfer_mode */
if (success)
{
int_value = args[2].value.pdb_int;
int_value = args[1].value.pdb_int;
switch (int_value)
{
case 0: transfer_mode = SHADOWS; break;
@ -989,13 +980,13 @@ color_balance_invoker (Argument *args)
/* preserve_lum */
if (success)
{
int_value = args[3].value.pdb_int;
int_value = args[2].value.pdb_int;
preserve_lum = (int_value) ? TRUE : FALSE;
}
/* cyan_red */
if (success)
{
fp_value = args[4].value.pdb_float;
fp_value = args[3].value.pdb_float;
if (fp_value >= -100 && fp_value <= 100)
cyan_red = fp_value;
else
@ -1004,7 +995,7 @@ color_balance_invoker (Argument *args)
/* magenta_green */
if (success)
{
fp_value = args[5].value.pdb_float;
fp_value = args[4].value.pdb_float;
if (fp_value >= -100 && fp_value <= 100)
magenta_green = fp_value;
else
@ -1013,7 +1004,7 @@ color_balance_invoker (Argument *args)
/* yellow_blue */
if (success)
{
fp_value = args[6].value.pdb_float;
fp_value = args[5].value.pdb_float;
if (fp_value >= -100 && fp_value <= 100)
yellow_blue = fp_value;
else

View File

@ -1298,10 +1298,6 @@ curves_CR_compose (CRMatrix a,
/* Procedure for defining the curve with a spline */
ProcArg curves_spline_args[] =
{
{ PDB_IMAGE,
"image",
N_("the image")
},
{ PDB_DRAWABLE,
"drawable",
N_("the drawable")
@ -1331,7 +1327,7 @@ ProcRecord curves_spline_proc =
PDB_INTERNAL,
/* Input arguments */
5,
4,
curves_spline_args,
/* Output arguments */
@ -1359,20 +1355,15 @@ curves_spline_invoker (Argument *args)
void *pr;
GimpDrawable *drawable;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
success = FALSE;
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* make sure the drawable is not indexed color */
if (success)
@ -1382,7 +1373,7 @@ curves_spline_invoker (Argument *args)
/* channel */
if (success)
{
int_value = args[2].value.pdb_int;
int_value = args[1].value.pdb_int;
if (success)
{
if (drawable_gray (drawable))
@ -1402,14 +1393,14 @@ curves_spline_invoker (Argument *args)
}
if (success)
{
num_cp = args[3].value.pdb_int;
num_cp = args[2].value.pdb_int;
if (num_cp < 4 || num_cp > 32 || (num_cp & 0x1))
success = FALSE;
}
/* control points */
if (success)
{
control_pts = (unsigned char *) args[4].value.pdb_pointer;
control_pts = (unsigned char *) args[3].value.pdb_pointer;
}
/* arrange to modify the curves */
@ -1456,10 +1447,6 @@ curves_spline_invoker (Argument *args)
/* Procedure for explicitly defining the curve */
ProcArg curves_explicit_args[] =
{
{ PDB_IMAGE,
"image",
N_("the image")
},
{ PDB_DRAWABLE,
"drawable",
N_("the drawable")
@ -1489,7 +1476,7 @@ ProcRecord curves_explicit_proc =
PDB_INTERNAL,
/* Input arguments */
5,
4,
curves_explicit_args,
/* Output arguments */
@ -1516,20 +1503,15 @@ curves_explicit_invoker (Argument *args)
void *pr;
GimpDrawable *drawable;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
success = FALSE;
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* make sure the drawable is not indexed color */
if (success)
@ -1538,7 +1520,7 @@ curves_explicit_invoker (Argument *args)
/* channel */
if (success)
{
int_value = args[2].value.pdb_int;
int_value = args[1].value.pdb_int;
if (success)
{
if (drawable_gray (drawable))
@ -1559,14 +1541,14 @@ curves_explicit_invoker (Argument *args)
/* the number of bytes */
if (success)
{
int_value = args[3].value.pdb_int;
int_value = args[2].value.pdb_int;
if (int_value != 256)
success = FALSE;
}
/* the curve */
if (success)
{
curve = (unsigned char *) args[4].value.pdb_pointer;
curve = (unsigned char *) args[3].value.pdb_pointer;
}
/* arrange to modify the curves */

View File

@ -1027,10 +1027,6 @@ hue_saturation_hue_partition_events (GtkWidget *widget,
/* The hue_saturation procedure definition */
ProcArg hue_saturation_args[] =
{
{ PDB_IMAGE,
"image",
"the image"
},
{ PDB_DRAWABLE,
"drawable",
"the drawable"
@ -1064,7 +1060,7 @@ ProcRecord hue_saturation_proc =
PDB_INTERNAL,
/* Input arguments */
6,
5,
hue_saturation_args,
/* Output arguments */
@ -1100,20 +1096,15 @@ hue_saturation_invoker (Argument *args)
lightness = 0.0;
saturation = 0.0;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
success = FALSE;
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* make sure the drawable is not indexed color */
if (success)
@ -1122,7 +1113,7 @@ hue_saturation_invoker (Argument *args)
/* hue_range */
if (success)
{
int_value = args[2].value.pdb_int;
int_value = args[1].value.pdb_int;
if (int_value < 0 || int_value > 6)
success = FALSE;
else
@ -1131,7 +1122,7 @@ hue_saturation_invoker (Argument *args)
/* hue_offset */
if (success)
{
fp_value = args[3].value.pdb_float;
fp_value = args[2].value.pdb_float;
if (fp_value < -180 || fp_value > 180)
success = FALSE;
else
@ -1140,7 +1131,7 @@ hue_saturation_invoker (Argument *args)
/* lightness */
if (success)
{
fp_value = args[4].value.pdb_float;
fp_value = args[3].value.pdb_float;
if (fp_value < -100 || fp_value > 100)
success = FALSE;
else
@ -1149,7 +1140,7 @@ hue_saturation_invoker (Argument *args)
/* saturation */
if (success)
{
fp_value = args[5].value.pdb_float;
fp_value = args[4].value.pdb_float;
if (fp_value < -100 || fp_value > 100)
success = FALSE;
else

View File

@ -611,10 +611,6 @@ threshold_high_threshold_text_update (GtkWidget *w,
/* The threshold procedure definition */
ProcArg threshold_args[] =
{
{ PDB_IMAGE,
"image",
N_("the image")
},
{ PDB_DRAWABLE,
"drawable",
N_("the drawable")
@ -640,7 +636,7 @@ ProcRecord threshold_proc =
PDB_INTERNAL,
/* Input arguments */
4,
3,
threshold_args,
/* Output arguments */
@ -671,20 +667,15 @@ threshold_invoker (args)
low_threshold = 0;
high_threshold = 0;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
success = FALSE;
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* make sure the drawable is not indexed color */
if (success)
@ -693,7 +684,7 @@ threshold_invoker (args)
/* low threhsold */
if (success)
{
int_value = args[2].value.pdb_int;
int_value = args[1].value.pdb_int;
if (int_value >= 0 && int_value < 256)
low_threshold = int_value;
else
@ -702,7 +693,7 @@ threshold_invoker (args)
/* high threhsold */
if (success)
{
int_value = args[3].value.pdb_int;
int_value = args[2].value.pdb_int;
if (int_value >= 0 && int_value < 256)
high_threshold = int_value;
else

View File

@ -618,7 +618,6 @@ blend_button_release (Tool *tool,
{
return_vals = procedural_db_run_proc ("gimp_blend",
&nreturn_vals,
PDB_IMAGE, pdb_image_to_id(gimage),
PDB_DRAWABLE, drawable_ID (gimage_active_drawable (gimage)),
PDB_INT32, (gint32) blend_options->blend_mode,
PDB_INT32, (gint32) blend_options->paint_mode,
@ -1711,10 +1710,6 @@ tools_free_blend (Tool *tool)
/* The blend procedure definition */
ProcArg blend_args[] =
{
{ PDB_IMAGE,
"image",
N_("The image")
},
{ PDB_DRAWABLE,
"drawable",
N_("The affected drawable")
@ -1784,7 +1779,7 @@ ProcRecord blend_proc =
PDB_INTERNAL,
/* Input arguments */
15,
14,
blend_args,
/* Output arguments */
@ -1826,25 +1821,20 @@ blend_invoker (Argument *args)
max_depth = 0;
threshold = 0.0;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* blend mode */
if (success)
{
int_value = args[2].value.pdb_int;
int_value = args[1].value.pdb_int;
switch (int_value)
{
case 0: blend_mode = FG_BG_RGB_MODE; break;
@ -1857,7 +1847,7 @@ blend_invoker (Argument *args)
/* paint mode */
if (success)
{
int_value = args[3].value.pdb_int;
int_value = args[2].value.pdb_int;
if (int_value >= NORMAL_MODE && int_value <= VALUE_MODE)
paint_mode = int_value;
else
@ -1866,7 +1856,7 @@ blend_invoker (Argument *args)
/* gradient type */
if (success)
{
int_value = args[4].value.pdb_int;
int_value = args[3].value.pdb_int;
switch (int_value)
{
case 0: gradient_type = Linear; break;
@ -1884,7 +1874,7 @@ blend_invoker (Argument *args)
/* opacity */
if (success)
{
fp_value = args[5].value.pdb_float;
fp_value = args[4].value.pdb_float;
if (fp_value >= 0.0 && fp_value <= 100.0)
opacity = fp_value;
else
@ -1893,7 +1883,7 @@ blend_invoker (Argument *args)
/* offset */
if (success)
{
fp_value = args[6].value.pdb_float;
fp_value = args[5].value.pdb_float;
if (fp_value >= 0.0)
offset = fp_value;
else
@ -1902,7 +1892,7 @@ blend_invoker (Argument *args)
/* repeat */
if (success)
{
int_value = args[7].value.pdb_int;
int_value = args[6].value.pdb_int;
switch (int_value)
{
case 0: repeat = REPEAT_NONE; break;
@ -1914,14 +1904,14 @@ blend_invoker (Argument *args)
/* supersampling */
if (success)
{
int_value = args[8].value.pdb_int;
int_value = args[7].value.pdb_int;
supersample = (int_value ? TRUE : FALSE);
}
/* max_depth */
if (success)
{
int_value = args[9].value.pdb_int;
int_value = args[8].value.pdb_int;
if (((int_value >= 1) && (int_value <= 9)) || !supersample)
max_depth = int_value;
@ -1931,7 +1921,7 @@ blend_invoker (Argument *args)
/* threshold */
if (success)
{
fp_value = args[10].value.pdb_float;
fp_value = args[9].value.pdb_float;
if (((fp_value >= 0.0) && (fp_value <= 4.0)) || !supersample)
threshold = fp_value;
@ -1941,10 +1931,10 @@ blend_invoker (Argument *args)
/* x1, y1, x2, y2 */
if (success)
{
x1 = args[11].value.pdb_float;
y1 = args[12].value.pdb_float;
x2 = args[13].value.pdb_float;
y2 = args[14].value.pdb_float;
x1 = args[10].value.pdb_float;
y1 = args[11].value.pdb_float;
x2 = args[12].value.pdb_float;
y2 = args[13].value.pdb_float;
}
/* call the blend procedure */

View File

@ -643,10 +643,6 @@ brightness_contrast_contrast_text_update (GtkWidget *w,
/* The brightness_contrast procedure definition */
ProcArg brightness_contrast_args[] =
{
{ PDB_IMAGE,
"image",
N_("the image")
},
{ PDB_DRAWABLE,
"drawable",
N_("the drawable")
@ -672,7 +668,7 @@ ProcRecord brightness_contrast_proc =
PDB_INTERNAL,
/* Input arguments */
4,
3,
brightness_contrast_args,
/* Output arguments */
@ -702,20 +698,15 @@ brightness_contrast_invoker (Argument *args)
brightness = 0;
contrast = 0;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* make sure the drawable is not indexed color */
if (success)
@ -724,7 +715,7 @@ brightness_contrast_invoker (Argument *args)
/* brightness */
if (success)
{
int_value = args[2].value.pdb_int;
int_value = args[1].value.pdb_int;
if (int_value < -127 || int_value > 127)
success = FALSE;
else
@ -733,7 +724,7 @@ brightness_contrast_invoker (Argument *args)
/* contrast */
if (success)
{
int_value = args[3].value.pdb_int;
int_value = args[2].value.pdb_int;
if (int_value < -127 || int_value > 127)
success = FALSE;
else

View File

@ -315,8 +315,6 @@ bucket_fill_button_release (tool, bevent, gdisp_ptr)
return_vals = procedural_db_run_proc ("gimp_bucket_fill",
&nreturn_vals,
PDB_IMAGE,
pdb_image_to_id(gdisp->gimage),
PDB_DRAWABLE, drawable_ID (gimage_active_drawable (gdisp->gimage)),
PDB_INT32, (gint32) fill_mode,
PDB_INT32, (gint32) bucket_options->paint_mode,
@ -698,10 +696,6 @@ tools_free_bucket_fill (tool)
/* The bucket fill procedure definition */
ProcArg bucket_fill_args[] =
{
{ PDB_IMAGE,
"image",
N_("the image")
},
{ PDB_DRAWABLE,
"drawable",
N_("the affected drawable")
@ -747,7 +741,7 @@ ProcRecord bucket_fill_proc =
PDB_INTERNAL,
/* Input arguments */
9,
8,
bucket_fill_args,
/* Output arguments */
@ -781,25 +775,20 @@ bucket_fill_invoker (args)
opacity = 100.0;
threshold = 0.0;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* fill mode */
if (success)
{
int_value = args[2].value.pdb_int;
int_value = args[1].value.pdb_int;
switch (int_value)
{
case 0: fill_mode = FgColorFill; break;
@ -811,7 +800,7 @@ bucket_fill_invoker (args)
/* paint mode */
if (success)
{
int_value = args[3].value.pdb_int;
int_value = args[2].value.pdb_int;
if (int_value >= NORMAL_MODE && int_value <= VALUE_MODE)
paint_mode = int_value;
else
@ -820,7 +809,7 @@ bucket_fill_invoker (args)
/* opacity */
if (success)
{
fp_value = args[4].value.pdb_float;
fp_value = args[3].value.pdb_float;
if (fp_value >= 0.0 && fp_value <= 100.0)
opacity = fp_value;
else
@ -829,7 +818,7 @@ bucket_fill_invoker (args)
/* threshold */
if (success)
{
fp_value = args[5].value.pdb_float;
fp_value = args[4].value.pdb_float;
if (fp_value >= 0.0 && fp_value <= 255.0)
threshold = fp_value;
else
@ -838,7 +827,7 @@ bucket_fill_invoker (args)
/* sample_merged */
if (success)
{
int_value = args[6].value.pdb_int;
int_value = args[5].value.pdb_int;
sample_merged = (int_value) ? TRUE : FALSE;
}
/* x, y */

View File

@ -971,10 +971,6 @@ by_color_select_preview_button_press (ByColorDialog *bcd,
/* The by_color_select procedure definition */
ProcArg by_color_select_args[] =
{
{ PDB_IMAGE,
"image",
N_("the image")
},
{ PDB_DRAWABLE,
"drawable",
N_("the drawable")
@ -1020,7 +1016,7 @@ ProcRecord by_color_select_proc =
PDB_INTERNAL,
/* Input arguments */
9,
8,
by_color_select_args,
/* Output arguments */
@ -1051,20 +1047,15 @@ by_color_select_invoker (Argument *args)
op = REPLACE;
threshold = 0;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
success = FALSE;
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* color */
if (success)
@ -1072,14 +1063,14 @@ by_color_select_invoker (Argument *args)
int i;
unsigned char *color_array;
color_array = (unsigned char *) args[2].value.pdb_pointer;
color_array = (unsigned char *) args[1].value.pdb_pointer;
for (i = 0; i < 3; i++)
color[i] = color_array[i];
}
/* threshold */
if (success)
{
int_value = args[3].value.pdb_int;
int_value = args[2].value.pdb_int;
if (int_value >= 0 && int_value <= 255)
threshold = int_value;
else
@ -1088,7 +1079,7 @@ by_color_select_invoker (Argument *args)
/* operation */
if (success)
{
int_value = args[4].value.pdb_int;
int_value = args[3].value.pdb_int;
switch (int_value)
{
case 0: op = ADD; break;
@ -1101,24 +1092,24 @@ by_color_select_invoker (Argument *args)
/* antialiasing? */
if (success)
{
int_value = args[5].value.pdb_int;
int_value = args[4].value.pdb_int;
antialias = (int_value) ? TRUE : FALSE;
}
/* feathering */
if (success)
{
int_value = args[6].value.pdb_int;
int_value = args[5].value.pdb_int;
feather = (int_value) ? TRUE : FALSE;
}
/* feather radius */
if (success)
{
feather_radius = args[7].value.pdb_float;
feather_radius = args[6].value.pdb_float;
}
/* sample merged */
if (success)
{
int_value = args[8].value.pdb_int;
int_value = args[7].value.pdb_int;
sample_merged = (int_value) ? TRUE : FALSE;
}

View File

@ -561,10 +561,6 @@ offset_halfheight_update (GtkWidget *widget,
/* The offset procedure definition */
ProcArg channel_ops_offset_args[] =
{
{ PDB_IMAGE,
"image",
"the image"
},
{ PDB_DRAWABLE,
"drawable",
"the drawable to offset"
@ -598,7 +594,7 @@ ProcRecord channel_ops_offset_proc =
PDB_INTERNAL,
/* Input arguments */
6,
5,
channel_ops_offset_args,
/* Output arguments */
@ -622,34 +618,29 @@ channel_ops_offset_invoker (Argument *args)
int offset_x;
int offset_y;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
if (success)
{
int_value = args[1].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
success = FALSE;
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
if (success)
{
wrap_around = (args[2].value.pdb_int) ? TRUE : FALSE;
wrap_around = (args[1].value.pdb_int) ? TRUE : FALSE;
}
if (success)
{
fill_type = args[3].value.pdb_int;
fill_type = args[2].value.pdb_int;
if (fill_type < OFFSET_BACKGROUND || fill_type > OFFSET_TRANSPARENT)
success = FALSE;
}
if (success)
{
offset_x = args[4].value.pdb_int;
offset_y = args[5].value.pdb_int;
offset_x = args[3].value.pdb_int;
offset_y = args[4].value.pdb_int;
}
if (success)

View File

@ -547,10 +547,6 @@ clone_non_gui_paint_func (PaintCore *paint_core,
/* The clone procedure definition */
ProcArg clone_args[] =
{
{ PDB_IMAGE,
"image",
N_("the image")
},
{ PDB_DRAWABLE,
"drawable",
N_("the drawable")
@ -593,7 +589,7 @@ ProcRecord clone_proc =
PDB_INTERNAL,
/* Input arguments */
8,
7,
clone_args,
/* Output arguments */
@ -621,25 +617,20 @@ clone_invoker (Argument *args)
drawable = NULL;
num_strokes = 0;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
success = FALSE;
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* the src drawable */
if (success)
{
int_value = args[2].value.pdb_int;
int_value = args[1].value.pdb_int;
src_drawable = drawable_get_ID (int_value);
if (src_drawable == NULL || gimage != drawable_gimage (src_drawable))
success = FALSE;
@ -649,7 +640,7 @@ clone_invoker (Argument *args)
/* the clone type */
if (success)
{
int_value = args[3].value.pdb_int;
int_value = args[2].value.pdb_int;
switch (int_value)
{
case 0: non_gui_type = ImageClone; break;
@ -660,13 +651,13 @@ clone_invoker (Argument *args)
/* x, y offsets */
if (success)
{
src_x = args[4].value.pdb_float;
src_y = args[5].value.pdb_float;
src_x = args[3].value.pdb_float;
src_y = args[4].value.pdb_float;
}
/* num strokes */
if (success)
{
int_value = args[6].value.pdb_int;
int_value = args[5].value.pdb_int;
if (int_value > 0)
num_strokes = int_value / 2;
else
@ -675,7 +666,7 @@ clone_invoker (Argument *args)
/* point array */
if (success)
stroke_array = (double *) args[7].value.pdb_pointer;
stroke_array = (double *) args[6].value.pdb_pointer;
if (success)
/* init the paint core */

View File

@ -877,10 +877,6 @@ color_balance_yb_text_update (GtkWidget *w,
/* The color_balance procedure definition */
ProcArg color_balance_args[] =
{
{ PDB_IMAGE,
"image",
N_("the image")
},
{ PDB_DRAWABLE,
"drawable",
N_("the drawable")
@ -918,7 +914,7 @@ ProcRecord color_balance_proc =
PDB_INTERNAL,
/* Input arguments */
7,
6,
color_balance_args,
/* Output arguments */
@ -955,20 +951,15 @@ color_balance_invoker (Argument *args)
magenta_green = 0;
yellow_blue = 0;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
success = FALSE;
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* make sure the drawable is not indexed color */
if (success)
@ -977,7 +968,7 @@ color_balance_invoker (Argument *args)
/* transfer_mode */
if (success)
{
int_value = args[2].value.pdb_int;
int_value = args[1].value.pdb_int;
switch (int_value)
{
case 0: transfer_mode = SHADOWS; break;
@ -989,13 +980,13 @@ color_balance_invoker (Argument *args)
/* preserve_lum */
if (success)
{
int_value = args[3].value.pdb_int;
int_value = args[2].value.pdb_int;
preserve_lum = (int_value) ? TRUE : FALSE;
}
/* cyan_red */
if (success)
{
fp_value = args[4].value.pdb_float;
fp_value = args[3].value.pdb_float;
if (fp_value >= -100 && fp_value <= 100)
cyan_red = fp_value;
else
@ -1004,7 +995,7 @@ color_balance_invoker (Argument *args)
/* magenta_green */
if (success)
{
fp_value = args[5].value.pdb_float;
fp_value = args[4].value.pdb_float;
if (fp_value >= -100 && fp_value <= 100)
magenta_green = fp_value;
else
@ -1013,7 +1004,7 @@ color_balance_invoker (Argument *args)
/* yellow_blue */
if (success)
{
fp_value = args[6].value.pdb_float;
fp_value = args[5].value.pdb_float;
if (fp_value >= -100 && fp_value <= 100)
yellow_blue = fp_value;
else

View File

@ -475,10 +475,6 @@ tools_free_color_picker (Tool *tool)
/* The color_picker procedure definition */
ProcArg color_picker_args[] =
{
{ PDB_IMAGE,
"image",
N_("the image")
},
{ PDB_DRAWABLE,
"drawable",
N_("the drawable")
@ -520,7 +516,7 @@ ProcRecord color_picker_proc =
PDB_INTERNAL,
/* Input arguments */
6,
5,
color_picker_args,
/* Output arguments */
@ -551,35 +547,32 @@ color_picker_invoker (Argument *args)
sample_merged = FALSE;
save_color = COLOR_UPDATE;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if ((gimage = gimage_get_ID (int_value)) == NULL)
success = FALSE;
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* x, y */
if (success)
{
x = args[2].value.pdb_float;
y = args[3].value.pdb_float;
x = args[1].value.pdb_float;
y = args[2].value.pdb_float;
}
/* sample_merged */
if (success)
{
int_value = args[4].value.pdb_int;
int_value = args[3].value.pdb_int;
sample_merged = (int_value) ? TRUE : FALSE;
}
/* save_color */
if (success)
{
int_value = args[5].value.pdb_int;
int_value = args[4].value.pdb_int;
save_color = (int_value) ? COLOR_NEW : COLOR_UPDATE;
}

View File

@ -424,10 +424,6 @@ convolve_non_gui_paint_func (PaintCore *paint_core,
/* The convolve procedure definition */
ProcArg convolve_args[] =
{
{ PDB_IMAGE,
"image",
N_("the image")
},
{ PDB_DRAWABLE,
"drawable",
N_("the drawable")
@ -462,7 +458,7 @@ ProcRecord convolve_proc =
PDB_INTERNAL,
/* Input arguments */
6,
5,
convolve_args,
/* Output arguments */
@ -493,25 +489,20 @@ convolve_invoker (Argument *args)
type = Blur;
num_strokes = 0;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
success = FALSE;
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* the pressure */
if (success)
{
fp_value = args[2].value.pdb_int;
fp_value = args[1].value.pdb_int;
if (fp_value >= 0.0 && fp_value <= 100.0)
pressure = fp_value;
else
@ -520,7 +511,7 @@ convolve_invoker (Argument *args)
/* the convolve type */
if (success)
{
int_value = args[3].value.pdb_int;
int_value = args[2].value.pdb_int;
switch (int_value)
{
case 0: type = Blur; break;
@ -532,7 +523,7 @@ convolve_invoker (Argument *args)
/* num strokes */
if (success)
{
int_value = args[4].value.pdb_int;
int_value = args[3].value.pdb_int;
if (int_value > 0)
num_strokes = int_value / 2;
else
@ -541,7 +532,7 @@ convolve_invoker (Argument *args)
/* point array */
if (success)
stroke_array = (double *) args[5].value.pdb_pointer;
stroke_array = (double *) args[4].value.pdb_pointer;
if (success)
/* init the paint core */

View File

@ -618,7 +618,6 @@ blend_button_release (Tool *tool,
{
return_vals = procedural_db_run_proc ("gimp_blend",
&nreturn_vals,
PDB_IMAGE, pdb_image_to_id(gimage),
PDB_DRAWABLE, drawable_ID (gimage_active_drawable (gimage)),
PDB_INT32, (gint32) blend_options->blend_mode,
PDB_INT32, (gint32) blend_options->paint_mode,
@ -1711,10 +1710,6 @@ tools_free_blend (Tool *tool)
/* The blend procedure definition */
ProcArg blend_args[] =
{
{ PDB_IMAGE,
"image",
N_("The image")
},
{ PDB_DRAWABLE,
"drawable",
N_("The affected drawable")
@ -1784,7 +1779,7 @@ ProcRecord blend_proc =
PDB_INTERNAL,
/* Input arguments */
15,
14,
blend_args,
/* Output arguments */
@ -1826,25 +1821,20 @@ blend_invoker (Argument *args)
max_depth = 0;
threshold = 0.0;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* blend mode */
if (success)
{
int_value = args[2].value.pdb_int;
int_value = args[1].value.pdb_int;
switch (int_value)
{
case 0: blend_mode = FG_BG_RGB_MODE; break;
@ -1857,7 +1847,7 @@ blend_invoker (Argument *args)
/* paint mode */
if (success)
{
int_value = args[3].value.pdb_int;
int_value = args[2].value.pdb_int;
if (int_value >= NORMAL_MODE && int_value <= VALUE_MODE)
paint_mode = int_value;
else
@ -1866,7 +1856,7 @@ blend_invoker (Argument *args)
/* gradient type */
if (success)
{
int_value = args[4].value.pdb_int;
int_value = args[3].value.pdb_int;
switch (int_value)
{
case 0: gradient_type = Linear; break;
@ -1884,7 +1874,7 @@ blend_invoker (Argument *args)
/* opacity */
if (success)
{
fp_value = args[5].value.pdb_float;
fp_value = args[4].value.pdb_float;
if (fp_value >= 0.0 && fp_value <= 100.0)
opacity = fp_value;
else
@ -1893,7 +1883,7 @@ blend_invoker (Argument *args)
/* offset */
if (success)
{
fp_value = args[6].value.pdb_float;
fp_value = args[5].value.pdb_float;
if (fp_value >= 0.0)
offset = fp_value;
else
@ -1902,7 +1892,7 @@ blend_invoker (Argument *args)
/* repeat */
if (success)
{
int_value = args[7].value.pdb_int;
int_value = args[6].value.pdb_int;
switch (int_value)
{
case 0: repeat = REPEAT_NONE; break;
@ -1914,14 +1904,14 @@ blend_invoker (Argument *args)
/* supersampling */
if (success)
{
int_value = args[8].value.pdb_int;
int_value = args[7].value.pdb_int;
supersample = (int_value ? TRUE : FALSE);
}
/* max_depth */
if (success)
{
int_value = args[9].value.pdb_int;
int_value = args[8].value.pdb_int;
if (((int_value >= 1) && (int_value <= 9)) || !supersample)
max_depth = int_value;
@ -1931,7 +1921,7 @@ blend_invoker (Argument *args)
/* threshold */
if (success)
{
fp_value = args[10].value.pdb_float;
fp_value = args[9].value.pdb_float;
if (((fp_value >= 0.0) && (fp_value <= 4.0)) || !supersample)
threshold = fp_value;
@ -1941,10 +1931,10 @@ blend_invoker (Argument *args)
/* x1, y1, x2, y2 */
if (success)
{
x1 = args[11].value.pdb_float;
y1 = args[12].value.pdb_float;
x2 = args[13].value.pdb_float;
y2 = args[14].value.pdb_float;
x1 = args[10].value.pdb_float;
y1 = args[11].value.pdb_float;
x2 = args[12].value.pdb_float;
y2 = args[13].value.pdb_float;
}
/* call the blend procedure */

View File

@ -116,10 +116,6 @@ desaturate (GimpDrawable *drawable)
/* The desaturate procedure definition */
ProcArg desaturate_args[] =
{
{ PDB_IMAGE,
"image",
N_("the image")
},
{ PDB_DRAWABLE,
"drawable",
N_("the drawable")
@ -137,7 +133,7 @@ ProcRecord desaturate_proc =
PDB_INTERNAL,
/* Input arguments */
2,
1,
desaturate_args,
/* Output arguments */
@ -160,20 +156,15 @@ desaturate_invoker (args)
drawable = NULL;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
success = FALSE;
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* check to make sure the drawable is color */

View File

@ -234,10 +234,6 @@ eq_histogram (hist, lut, bytes, count)
/* The equalize procedure definition */
ProcArg equalize_args[] =
{
{ PDB_IMAGE,
"image",
N_("the image")
},
{ PDB_DRAWABLE,
"drawable",
N_("the drawable")
@ -259,7 +255,7 @@ ProcRecord equalize_proc =
PDB_INTERNAL,
/* Input arguments */
3,
2,
equalize_args,
/* Output arguments */
@ -283,25 +279,20 @@ equalize_invoker (args)
drawable = NULL;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
success = FALSE;
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* the mask only option */
if (success)
{
int_value = args[2].value.pdb_int;
int_value = args[1].value.pdb_int;
mask_only = (int_value) ? TRUE : FALSE;
}
/* make sure the drawable is not indexed color */

View File

@ -48,7 +48,6 @@ image_invert (gimage_ptr)
return_vals = procedural_db_run_proc ("gimp_invert",
&nreturn_vals,
PDB_IMAGE, pdb_image_to_id(gimage),
PDB_DRAWABLE, drawable_ID (drawable),
PDB_END);
@ -117,10 +116,6 @@ invert (drawable)
/* The invert procedure definition */
ProcArg invert_args[] =
{
{ PDB_IMAGE,
"image",
"the image"
},
{ PDB_DRAWABLE,
"drawable",
"the drawable"
@ -138,7 +133,7 @@ ProcRecord invert_proc =
PDB_INTERNAL,
/* Input arguments */
2,
1,
invert_args,
/* Output arguments */
@ -161,26 +156,15 @@ invert_invoker (args)
drawable = NULL;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
{
g_warning ("bleep1\n");
success = FALSE;
}
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
{
g_warning ("bleep2\n");
success = FALSE;
}
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* make sure the drawable is not indexed color */
if (success)

View File

@ -561,10 +561,6 @@ offset_halfheight_update (GtkWidget *widget,
/* The offset procedure definition */
ProcArg channel_ops_offset_args[] =
{
{ PDB_IMAGE,
"image",
"the image"
},
{ PDB_DRAWABLE,
"drawable",
"the drawable to offset"
@ -598,7 +594,7 @@ ProcRecord channel_ops_offset_proc =
PDB_INTERNAL,
/* Input arguments */
6,
5,
channel_ops_offset_args,
/* Output arguments */
@ -622,34 +618,29 @@ channel_ops_offset_invoker (Argument *args)
int offset_x;
int offset_y;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
if (success)
{
int_value = args[1].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
success = FALSE;
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
if (success)
{
wrap_around = (args[2].value.pdb_int) ? TRUE : FALSE;
wrap_around = (args[1].value.pdb_int) ? TRUE : FALSE;
}
if (success)
{
fill_type = args[3].value.pdb_int;
fill_type = args[2].value.pdb_int;
if (fill_type < OFFSET_BACKGROUND || fill_type > OFFSET_TRANSPARENT)
success = FALSE;
}
if (success)
{
offset_x = args[4].value.pdb_int;
offset_y = args[5].value.pdb_int;
offset_x = args[3].value.pdb_int;
offset_y = args[4].value.pdb_int;
}
if (success)

View File

@ -561,10 +561,6 @@ offset_halfheight_update (GtkWidget *widget,
/* The offset procedure definition */
ProcArg channel_ops_offset_args[] =
{
{ PDB_IMAGE,
"image",
"the image"
},
{ PDB_DRAWABLE,
"drawable",
"the drawable to offset"
@ -598,7 +594,7 @@ ProcRecord channel_ops_offset_proc =
PDB_INTERNAL,
/* Input arguments */
6,
5,
channel_ops_offset_args,
/* Output arguments */
@ -622,34 +618,29 @@ channel_ops_offset_invoker (Argument *args)
int offset_x;
int offset_y;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
if (success)
{
int_value = args[1].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
success = FALSE;
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
if (success)
{
wrap_around = (args[2].value.pdb_int) ? TRUE : FALSE;
wrap_around = (args[1].value.pdb_int) ? TRUE : FALSE;
}
if (success)
{
fill_type = args[3].value.pdb_int;
fill_type = args[2].value.pdb_int;
if (fill_type < OFFSET_BACKGROUND || fill_type > OFFSET_TRANSPARENT)
success = FALSE;
}
if (success)
{
offset_x = args[4].value.pdb_int;
offset_y = args[5].value.pdb_int;
offset_x = args[3].value.pdb_int;
offset_y = args[4].value.pdb_int;
}
if (success)

View File

@ -1298,10 +1298,6 @@ curves_CR_compose (CRMatrix a,
/* Procedure for defining the curve with a spline */
ProcArg curves_spline_args[] =
{
{ PDB_IMAGE,
"image",
N_("the image")
},
{ PDB_DRAWABLE,
"drawable",
N_("the drawable")
@ -1331,7 +1327,7 @@ ProcRecord curves_spline_proc =
PDB_INTERNAL,
/* Input arguments */
5,
4,
curves_spline_args,
/* Output arguments */
@ -1359,20 +1355,15 @@ curves_spline_invoker (Argument *args)
void *pr;
GimpDrawable *drawable;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
success = FALSE;
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* make sure the drawable is not indexed color */
if (success)
@ -1382,7 +1373,7 @@ curves_spline_invoker (Argument *args)
/* channel */
if (success)
{
int_value = args[2].value.pdb_int;
int_value = args[1].value.pdb_int;
if (success)
{
if (drawable_gray (drawable))
@ -1402,14 +1393,14 @@ curves_spline_invoker (Argument *args)
}
if (success)
{
num_cp = args[3].value.pdb_int;
num_cp = args[2].value.pdb_int;
if (num_cp < 4 || num_cp > 32 || (num_cp & 0x1))
success = FALSE;
}
/* control points */
if (success)
{
control_pts = (unsigned char *) args[4].value.pdb_pointer;
control_pts = (unsigned char *) args[3].value.pdb_pointer;
}
/* arrange to modify the curves */
@ -1456,10 +1447,6 @@ curves_spline_invoker (Argument *args)
/* Procedure for explicitly defining the curve */
ProcArg curves_explicit_args[] =
{
{ PDB_IMAGE,
"image",
N_("the image")
},
{ PDB_DRAWABLE,
"drawable",
N_("the drawable")
@ -1489,7 +1476,7 @@ ProcRecord curves_explicit_proc =
PDB_INTERNAL,
/* Input arguments */
5,
4,
curves_explicit_args,
/* Output arguments */
@ -1516,20 +1503,15 @@ curves_explicit_invoker (Argument *args)
void *pr;
GimpDrawable *drawable;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
success = FALSE;
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* make sure the drawable is not indexed color */
if (success)
@ -1538,7 +1520,7 @@ curves_explicit_invoker (Argument *args)
/* channel */
if (success)
{
int_value = args[2].value.pdb_int;
int_value = args[1].value.pdb_int;
if (success)
{
if (drawable_gray (drawable))
@ -1559,14 +1541,14 @@ curves_explicit_invoker (Argument *args)
/* the number of bytes */
if (success)
{
int_value = args[3].value.pdb_int;
int_value = args[2].value.pdb_int;
if (int_value != 256)
success = FALSE;
}
/* the curve */
if (success)
{
curve = (unsigned char *) args[4].value.pdb_pointer;
curve = (unsigned char *) args[3].value.pdb_pointer;
}
/* arrange to modify the curves */

View File

@ -116,10 +116,6 @@ desaturate (GimpDrawable *drawable)
/* The desaturate procedure definition */
ProcArg desaturate_args[] =
{
{ PDB_IMAGE,
"image",
N_("the image")
},
{ PDB_DRAWABLE,
"drawable",
N_("the drawable")
@ -137,7 +133,7 @@ ProcRecord desaturate_proc =
PDB_INTERNAL,
/* Input arguments */
2,
1,
desaturate_args,
/* Output arguments */
@ -160,20 +156,15 @@ desaturate_invoker (args)
drawable = NULL;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
success = FALSE;
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* check to make sure the drawable is color */

View File

@ -50,15 +50,11 @@ edit_cut_invoker (Argument *args)
if (success)
{
int_value = args[0].value.pdb_int;
if ((gimage = gimage_get_ID (int_value)) == NULL)
success = FALSE;
}
if (success)
{
int_value = args[1].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
success = FALSE;
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* create the new image */
if (success)
@ -70,10 +66,6 @@ edit_cut_invoker (Argument *args)
/* The procedure definition */
ProcArg edit_cut_args[] =
{
{ PDB_IMAGE,
"image",
N_("the image")
},
{ PDB_DRAWABLE,
"drawable",
N_("the drawable to cut from")
@ -91,7 +83,7 @@ ProcRecord edit_cut_proc =
PDB_INTERNAL,
/* Input arguments */
2,
1,
edit_cut_args,
/* Output arguments */
@ -119,15 +111,11 @@ edit_copy_invoker (Argument *args)
if (success)
{
int_value = args[0].value.pdb_int;
if ((gimage = gimage_get_ID (int_value)) == NULL)
success = FALSE;
}
if (success)
{
int_value = args[1].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
success = FALSE;
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* create the new image */
@ -140,10 +128,6 @@ edit_copy_invoker (Argument *args)
/* The procedure definition */
ProcArg edit_copy_args[] =
{
{ PDB_IMAGE,
"image",
N_("the image")
},
{ PDB_DRAWABLE,
"drawable",
N_("the drawable to copy from")
@ -161,7 +145,7 @@ ProcRecord edit_copy_proc =
PDB_INTERNAL,
/* Input arguments */
2,
1,
edit_copy_args,
/* Output arguments */
@ -191,19 +175,15 @@ edit_paste_invoker (Argument *args)
if (success)
{
int_value = args[0].value.pdb_int;
if ((gimage = gimage_get_ID (int_value)) == NULL)
success = FALSE;
drawable = drawable_get_ID (int_value);
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
if (success)
{
int_value = args[1].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
success = FALSE;
}
if (success)
{
int_value = args[2].value.pdb_int;
paste_into = (int_value) ? TRUE : FALSE;
}
@ -222,10 +202,6 @@ edit_paste_invoker (Argument *args)
/* The procedure definition */
ProcArg edit_paste_args[] =
{
{ PDB_IMAGE,
"image",
N_("the image")
},
{ PDB_DRAWABLE,
"drawable",
N_("the drawable to paste from")
@ -255,7 +231,7 @@ ProcRecord edit_paste_proc =
PDB_INTERNAL,
/* Input arguments */
3,
2,
edit_paste_args,
/* Output arguments */
@ -283,15 +259,11 @@ edit_clear_invoker (Argument *args)
if (success)
{
int_value = args[0].value.pdb_int;
if ((gimage = gimage_get_ID (int_value)) == NULL)
success = FALSE;
}
if (success)
{
int_value = args[1].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
success = FALSE;
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* create the new image */
@ -304,10 +276,6 @@ edit_clear_invoker (Argument *args)
/* The procedure definition */
ProcArg edit_clear_args[] =
{
{ PDB_IMAGE,
"image",
N_("the image")
},
{ PDB_DRAWABLE,
"drawable",
N_("The drawable to clear from")
@ -325,7 +293,7 @@ ProcRecord edit_clear_proc =
PDB_INTERNAL,
/* Input arguments */
2,
1,
edit_clear_args,
/* Output arguments */
@ -352,15 +320,11 @@ edit_fill_invoker (Argument *args)
if (success)
{
int_value = args[0].value.pdb_int;
if ((gimage = gimage_get_ID (int_value)) == NULL)
success = FALSE;
}
if (success)
{
int_value = args[1].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
success = FALSE;
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* create the new image */
@ -373,10 +337,6 @@ edit_fill_invoker (Argument *args)
/* The procedure definition */
ProcArg edit_fill_args[] =
{
{ PDB_IMAGE,
"image",
N_("the image")
},
{ PDB_DRAWABLE,
"drawable",
N_("the drawable to fill from")
@ -394,7 +354,7 @@ ProcRecord edit_fill_proc =
PDB_INTERNAL,
/* Input arguments */
2,
1,
edit_fill_args,
/* Output arguments */
@ -422,15 +382,11 @@ edit_stroke_invoker (Argument *args)
if (success)
{
int_value = args[0].value.pdb_int;
if ((gimage = gimage_get_ID (int_value)) == NULL)
success = FALSE;
}
if (success)
{
int_value = args[1].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
success = FALSE;
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* create the new image */
@ -443,10 +399,6 @@ edit_stroke_invoker (Argument *args)
/* The procedure definition */
ProcArg edit_stroke_args[] =
{
{ PDB_IMAGE,
"image",
N_("the image")
},
{ PDB_DRAWABLE,
"drawable",
N_("the drawable to stroke to")
@ -464,7 +416,7 @@ ProcRecord edit_stroke_proc =
PDB_INTERNAL,
/* Input arguments */
2,
1,
edit_stroke_args,
/* Output arguments */

View File

@ -234,10 +234,6 @@ eq_histogram (hist, lut, bytes, count)
/* The equalize procedure definition */
ProcArg equalize_args[] =
{
{ PDB_IMAGE,
"image",
N_("the image")
},
{ PDB_DRAWABLE,
"drawable",
N_("the drawable")
@ -259,7 +255,7 @@ ProcRecord equalize_proc =
PDB_INTERNAL,
/* Input arguments */
3,
2,
equalize_args,
/* Output arguments */
@ -283,25 +279,20 @@ equalize_invoker (args)
drawable = NULL;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
success = FALSE;
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* the mask only option */
if (success)
{
int_value = args[2].value.pdb_int;
int_value = args[1].value.pdb_int;
mask_only = (int_value) ? TRUE : FALSE;
}
/* make sure the drawable is not indexed color */

View File

@ -202,10 +202,6 @@ eraser_non_gui_paint_func (PaintCore *paint_core, GimpDrawable *drawable, int st
/* The eraser procedure definition */
ProcArg eraser_extended_args[] =
{
{ PDB_IMAGE,
"image",
N_("the image")
},
{ PDB_DRAWABLE,
"drawable",
N_("the drawable")
@ -230,10 +226,6 @@ ProcArg eraser_extended_args[] =
ProcArg eraser_args[] =
{
{ PDB_IMAGE,
"image",
N_("the image")
},
{ PDB_DRAWABLE,
"drawable",
N_("the drawable")
@ -260,7 +252,7 @@ ProcRecord eraser_proc =
PDB_INTERNAL,
/* Input arguments */
4,
3,
eraser_args,
/* Output arguments */
@ -282,7 +274,7 @@ ProcRecord eraser_extended_proc =
PDB_INTERNAL,
/* Input arguments */
6,
5,
eraser_extended_args,
/* Output arguments */
@ -308,25 +300,20 @@ eraser_invoker (args)
drawable = NULL;
num_strokes = 0;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
success = FALSE;
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* num strokes */
if (success)
{
int_value = args[2].value.pdb_int;
int_value = args[1].value.pdb_int;
if (int_value > 0)
num_strokes = int_value / 2;
else
@ -335,7 +322,7 @@ eraser_invoker (args)
/* point array */
if (success)
stroke_array = (double *) args[3].value.pdb_pointer;
stroke_array = (double *) args[2].value.pdb_pointer;
if (success)
/* init the paint core */
@ -390,25 +377,20 @@ eraser_extended_invoker (args)
drawable = NULL;
num_strokes = 0;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
success = FALSE;
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* num strokes */
if (success)
{
int_value = args[2].value.pdb_int;
int_value = args[1].value.pdb_int;
if (int_value > 0)
num_strokes = int_value / 2;
else
@ -417,7 +399,7 @@ eraser_extended_invoker (args)
/* point array */
if (success)
stroke_array = (double *) args[3].value.pdb_pointer;
stroke_array = (double *) args[2].value.pdb_pointer;
if (success)
/* init the paint core */
@ -426,8 +408,8 @@ eraser_extended_invoker (args)
if (success)
{
non_gui_hard = args[4].value.pdb_int;
non_gui_incremental = args[5].value.pdb_int;
non_gui_hard = args[3].value.pdb_int;
non_gui_incremental = args[4].value.pdb_int;
}
if (success)

View File

@ -332,10 +332,6 @@ flip_change_type (int new_type)
/* The flip procedure definition */
ProcArg flip_args[] =
{
{ PDB_IMAGE,
"image",
N_("the image")
},
{ PDB_DRAWABLE,
"drawable",
N_("the affected drawable")
@ -365,7 +361,7 @@ ProcRecord flip_proc =
PDB_INTERNAL,
/* Input arguments */
3,
2,
flip_args,
/* Output arguments */
@ -395,25 +391,20 @@ flip_invoker (Argument *args)
new_tiles = NULL;
layer = NULL;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
success = FALSE;
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* flip type */
if (success)
{
int_value = args[2].value.pdb_int;
int_value = args[1].value.pdb_int;
switch (int_value)
{
case 0: flip_type = 0; break;

View File

@ -579,10 +579,6 @@ tools_free_fuzzy_select (Tool *tool)
/* The fuzzy_select procedure definition */
ProcArg fuzzy_select_args[] =
{
{ PDB_IMAGE,
"image",
"the image"
},
{ PDB_DRAWABLE,
"drawable",
"the drawable"
@ -632,7 +628,7 @@ ProcRecord fuzzy_select_proc =
PDB_INTERNAL,
/* Input arguments */
10,
9,
fuzzy_select_args,
/* Output arguments */
@ -663,31 +659,26 @@ fuzzy_select_invoker (Argument *args)
op = REPLACE;
threshold = 0;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
success = FALSE;
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* x, y */
if (success)
{
x = args[2].value.pdb_float;
y = args[3].value.pdb_float;
x = args[1].value.pdb_float;
y = args[2].value.pdb_float;
}
/* threshold */
if (success)
{
int_value = args[4].value.pdb_int;
int_value = args[3].value.pdb_int;
if (int_value >= 0 && int_value <= 255)
threshold = int_value;
else
@ -696,7 +687,7 @@ fuzzy_select_invoker (Argument *args)
/* operation */
if (success)
{
int_value = args[5].value.pdb_int;
int_value = args[4].value.pdb_int;
switch (int_value)
{
case 0: op = ADD; break;
@ -709,24 +700,24 @@ fuzzy_select_invoker (Argument *args)
/* antialiasing? */
if (success)
{
int_value = args[6].value.pdb_int;
int_value = args[5].value.pdb_int;
antialias = (int_value) ? TRUE : FALSE;
}
/* feathering */
if (success)
{
int_value = args[7].value.pdb_int;
int_value = args[6].value.pdb_int;
feather = (int_value) ? TRUE : FALSE;
}
/* feather radius */
if (success)
{
feather_radius = args[8].value.pdb_float;
feather_radius = args[7].value.pdb_float;
}
/* sample merged */
if (success)
{
int_value = args[9].value.pdb_int;
int_value = args[8].value.pdb_int;
sample_merged = (int_value) ? TRUE : FALSE;
}

View File

@ -359,18 +359,15 @@ gimage_mask_float_invoker (Argument *args)
if (success)
{
int_value = args[0].value.pdb_int;
if ((gimage = gimage_get_ID (int_value)) == NULL)
success = FALSE;
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
if (success)
{
int_value = args[1].value.pdb_int;
drawable = drawable_get_ID (int_value);
}
if (success)
{
offx = args[2].value.pdb_int;
offy = args[3].value.pdb_int;
offx = args[1].value.pdb_int;
offy = args[2].value.pdb_int;
}
if (success)
success = ((layer = gimage_mask_float (gimage, drawable, offx, offy)) != NULL);
@ -386,10 +383,6 @@ gimage_mask_float_invoker (Argument *args)
/* The procedure definition */
ProcArg gimage_mask_float_args[] =
{
{ PDB_IMAGE,
"image",
"the image"
},
{ PDB_DRAWABLE,
"drawable",
"the drawable from which to float selection"
@ -423,7 +416,7 @@ ProcRecord gimage_mask_float_proc =
PDB_INTERNAL,
/* Input arguments */
4,
3,
gimage_mask_float_args,
/* Output arguments */
@ -975,14 +968,10 @@ gimage_mask_layer_alpha_invoker (Argument *args)
if (success)
{
int_value = args[0].value.pdb_int;
if ((gimage = gimage_get_ID (int_value)) == NULL)
success = FALSE;
}
if (success)
{
int_value = args[1].value.pdb_int;
if ((layer = layer_get_ID (int_value)) == NULL)
success = FALSE;
success = FALSE;
else
gimage = drawable_gimage (GIMP_DRAWABLE(layer));
}
if (success)
gimage_mask_layer_alpha (gimage, layer);
@ -993,10 +982,6 @@ gimage_mask_layer_alpha_invoker (Argument *args)
/* The procedure definition */
ProcArg gimage_mask_layer_alpha_args[] =
{
{ PDB_IMAGE,
"image",
"the image"
},
{ PDB_LAYER,
"layer",
"layer with alpha"
@ -1014,7 +999,7 @@ ProcRecord gimage_mask_layer_alpha_proc =
PDB_INTERNAL,
/* Input arguments */
2,
1,
gimage_mask_layer_alpha_args,
/* Output arguments */
@ -1039,17 +1024,14 @@ gimage_mask_load_invoker (Argument *args)
if (success)
{
int_value = args[0].value.pdb_int;
if ((gimage = gimage_get_ID (int_value)) == NULL)
success = FALSE;
}
if (success)
{
int_value = args[1].value.pdb_int;
if ((channel = channel_get_ID (int_value)) == NULL)
success = FALSE;
else
success = (drawable_width (GIMP_DRAWABLE(channel)) == gimage->width &&
drawable_height (GIMP_DRAWABLE(channel)) == gimage->height);
{
success = (drawable_width (GIMP_DRAWABLE(channel)) == gimage->width &&
drawable_height (GIMP_DRAWABLE(channel)) == gimage->height);
gimage = drawable_gimage (GIMP_DRAWABLE(channel));
}
}
if (success)
@ -1061,10 +1043,6 @@ gimage_mask_load_invoker (Argument *args)
/* The procedure definition */
ProcArg gimage_mask_load_args[] =
{
{ PDB_IMAGE,
"image",
"the image"
},
{ PDB_CHANNEL,
"channel",
"the channel"
@ -1082,7 +1060,7 @@ ProcRecord gimage_mask_load_proc =
PDB_INTERNAL,
/* Input arguments */
2,
1,
gimage_mask_load_args,
/* Output arguments */

View File

@ -116,10 +116,6 @@ desaturate (GimpDrawable *drawable)
/* The desaturate procedure definition */
ProcArg desaturate_args[] =
{
{ PDB_IMAGE,
"image",
N_("the image")
},
{ PDB_DRAWABLE,
"drawable",
N_("the drawable")
@ -137,7 +133,7 @@ ProcRecord desaturate_proc =
PDB_INTERNAL,
/* Input arguments */
2,
1,
desaturate_args,
/* Output arguments */
@ -160,20 +156,15 @@ desaturate_invoker (args)
drawable = NULL;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
success = FALSE;
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* check to make sure the drawable is color */

View File

@ -234,10 +234,6 @@ eq_histogram (hist, lut, bytes, count)
/* The equalize procedure definition */
ProcArg equalize_args[] =
{
{ PDB_IMAGE,
"image",
N_("the image")
},
{ PDB_DRAWABLE,
"drawable",
N_("the drawable")
@ -259,7 +255,7 @@ ProcRecord equalize_proc =
PDB_INTERNAL,
/* Input arguments */
3,
2,
equalize_args,
/* Output arguments */
@ -283,25 +279,20 @@ equalize_invoker (args)
drawable = NULL;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
success = FALSE;
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* the mask only option */
if (success)
{
int_value = args[2].value.pdb_int;
int_value = args[1].value.pdb_int;
mask_only = (int_value) ? TRUE : FALSE;
}
/* make sure the drawable is not indexed color */

View File

@ -48,7 +48,6 @@ image_invert (gimage_ptr)
return_vals = procedural_db_run_proc ("gimp_invert",
&nreturn_vals,
PDB_IMAGE, pdb_image_to_id(gimage),
PDB_DRAWABLE, drawable_ID (drawable),
PDB_END);
@ -117,10 +116,6 @@ invert (drawable)
/* The invert procedure definition */
ProcArg invert_args[] =
{
{ PDB_IMAGE,
"image",
"the image"
},
{ PDB_DRAWABLE,
"drawable",
"the drawable"
@ -138,7 +133,7 @@ ProcRecord invert_proc =
PDB_INTERNAL,
/* Input arguments */
2,
1,
invert_args,
/* Output arguments */
@ -161,26 +156,15 @@ invert_invoker (args)
drawable = NULL;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
{
g_warning ("bleep1\n");
success = FALSE;
}
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
{
g_warning ("bleep2\n");
success = FALSE;
}
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* make sure the drawable is not indexed color */
if (success)

View File

@ -561,10 +561,6 @@ offset_halfheight_update (GtkWidget *widget,
/* The offset procedure definition */
ProcArg channel_ops_offset_args[] =
{
{ PDB_IMAGE,
"image",
"the image"
},
{ PDB_DRAWABLE,
"drawable",
"the drawable to offset"
@ -598,7 +594,7 @@ ProcRecord channel_ops_offset_proc =
PDB_INTERNAL,
/* Input arguments */
6,
5,
channel_ops_offset_args,
/* Output arguments */
@ -622,34 +618,29 @@ channel_ops_offset_invoker (Argument *args)
int offset_x;
int offset_y;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
if (success)
{
int_value = args[1].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
success = FALSE;
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
if (success)
{
wrap_around = (args[2].value.pdb_int) ? TRUE : FALSE;
wrap_around = (args[1].value.pdb_int) ? TRUE : FALSE;
}
if (success)
{
fill_type = args[3].value.pdb_int;
fill_type = args[2].value.pdb_int;
if (fill_type < OFFSET_BACKGROUND || fill_type > OFFSET_TRANSPARENT)
success = FALSE;
}
if (success)
{
offset_x = args[4].value.pdb_int;
offset_y = args[5].value.pdb_int;
offset_x = args[3].value.pdb_int;
offset_y = args[4].value.pdb_int;
}
if (success)

View File

@ -561,10 +561,6 @@ offset_halfheight_update (GtkWidget *widget,
/* The offset procedure definition */
ProcArg channel_ops_offset_args[] =
{
{ PDB_IMAGE,
"image",
"the image"
},
{ PDB_DRAWABLE,
"drawable",
"the drawable to offset"
@ -598,7 +594,7 @@ ProcRecord channel_ops_offset_proc =
PDB_INTERNAL,
/* Input arguments */
6,
5,
channel_ops_offset_args,
/* Output arguments */
@ -622,34 +618,29 @@ channel_ops_offset_invoker (Argument *args)
int offset_x;
int offset_y;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
if (success)
{
int_value = args[1].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
success = FALSE;
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
if (success)
{
wrap_around = (args[2].value.pdb_int) ? TRUE : FALSE;
wrap_around = (args[1].value.pdb_int) ? TRUE : FALSE;
}
if (success)
{
fill_type = args[3].value.pdb_int;
fill_type = args[2].value.pdb_int;
if (fill_type < OFFSET_BACKGROUND || fill_type > OFFSET_TRANSPARENT)
success = FALSE;
}
if (success)
{
offset_x = args[4].value.pdb_int;
offset_y = args[5].value.pdb_int;
offset_x = args[3].value.pdb_int;
offset_y = args[4].value.pdb_int;
}
if (success)

View File

@ -613,10 +613,6 @@ histogram_tool_blue_callback (GtkWidget *w,
/* The histogram procedure definition */
ProcArg histogram_args[] =
{
{ PDB_IMAGE,
"image",
"the image"
},
{ PDB_DRAWABLE,
"drawable",
"the drawable"
@ -674,7 +670,7 @@ ProcRecord histogram_proc =
PDB_INTERNAL,
/* Input arguments */
5,
4,
histogram_args,
/* Output arguments */
@ -709,25 +705,20 @@ histogram_invoker (Argument *args)
low_range = 0;
high_range = 0;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
success = FALSE;
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* channel */
if (success)
{
int_value = args[2].value.pdb_int;
int_value = args[1].value.pdb_int;
if (success)
{
if (drawable_gray (drawable))
@ -748,7 +739,7 @@ histogram_invoker (Argument *args)
/* low range */
if (success)
{
int_value = args[3].value.pdb_int;
int_value = args[2].value.pdb_int;
if (int_value >= 0 && int_value < 256)
low_range = int_value;
else
@ -757,7 +748,7 @@ histogram_invoker (Argument *args)
/* high range */
if (success)
{
int_value = args[4].value.pdb_int;
int_value = args[3].value.pdb_int;
if (int_value >= 0 && int_value < 256)
high_range = int_value;
else

View File

@ -1027,10 +1027,6 @@ hue_saturation_hue_partition_events (GtkWidget *widget,
/* The hue_saturation procedure definition */
ProcArg hue_saturation_args[] =
{
{ PDB_IMAGE,
"image",
"the image"
},
{ PDB_DRAWABLE,
"drawable",
"the drawable"
@ -1064,7 +1060,7 @@ ProcRecord hue_saturation_proc =
PDB_INTERNAL,
/* Input arguments */
6,
5,
hue_saturation_args,
/* Output arguments */
@ -1100,20 +1096,15 @@ hue_saturation_invoker (Argument *args)
lightness = 0.0;
saturation = 0.0;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
success = FALSE;
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* make sure the drawable is not indexed color */
if (success)
@ -1122,7 +1113,7 @@ hue_saturation_invoker (Argument *args)
/* hue_range */
if (success)
{
int_value = args[2].value.pdb_int;
int_value = args[1].value.pdb_int;
if (int_value < 0 || int_value > 6)
success = FALSE;
else
@ -1131,7 +1122,7 @@ hue_saturation_invoker (Argument *args)
/* hue_offset */
if (success)
{
fp_value = args[3].value.pdb_float;
fp_value = args[2].value.pdb_float;
if (fp_value < -180 || fp_value > 180)
success = FALSE;
else
@ -1140,7 +1131,7 @@ hue_saturation_invoker (Argument *args)
/* lightness */
if (success)
{
fp_value = args[4].value.pdb_float;
fp_value = args[3].value.pdb_float;
if (fp_value < -100 || fp_value > 100)
success = FALSE;
else
@ -1149,7 +1140,7 @@ hue_saturation_invoker (Argument *args)
/* saturation */
if (success)
{
fp_value = args[5].value.pdb_float;
fp_value = args[4].value.pdb_float;
if (fp_value < -100 || fp_value > 100)
success = FALSE;
else

View File

@ -48,7 +48,6 @@ image_invert (gimage_ptr)
return_vals = procedural_db_run_proc ("gimp_invert",
&nreturn_vals,
PDB_IMAGE, pdb_image_to_id(gimage),
PDB_DRAWABLE, drawable_ID (drawable),
PDB_END);
@ -117,10 +116,6 @@ invert (drawable)
/* The invert procedure definition */
ProcArg invert_args[] =
{
{ PDB_IMAGE,
"image",
"the image"
},
{ PDB_DRAWABLE,
"drawable",
"the drawable"
@ -138,7 +133,7 @@ ProcRecord invert_proc =
PDB_INTERNAL,
/* Input arguments */
2,
1,
invert_args,
/* Output arguments */
@ -161,26 +156,15 @@ invert_invoker (args)
drawable = NULL;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
{
g_warning ("bleep1\n");
success = FALSE;
}
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
{
g_warning ("bleep2\n");
success = FALSE;
}
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* make sure the drawable is not indexed color */
if (success)

View File

@ -1440,10 +1440,6 @@ levels_output_da_events (GtkWidget *widget,
/* The levels procedure definition */
ProcArg levels_args[] =
{
{ PDB_IMAGE,
"image",
"the image"
},
{ PDB_DRAWABLE,
"drawable",
"the drawable"
@ -1485,7 +1481,7 @@ ProcRecord levels_proc =
PDB_INTERNAL,
/* Input arguments */
8,
7,
levels_args,
/* Output arguments */
@ -1524,20 +1520,15 @@ levels_invoker (Argument *args)
low_output = 0;
high_output = 0;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
success = FALSE;
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* make sure the drawable is not indexed color */
if (success)
@ -1546,7 +1537,7 @@ levels_invoker (Argument *args)
/* channel */
if (success)
{
int_value = args[2].value.pdb_int;
int_value = args[1].value.pdb_int;
if (success)
{
if (drawable_gray (drawable))
@ -1567,7 +1558,7 @@ levels_invoker (Argument *args)
/* low input */
if (success)
{
int_value = args[3].value.pdb_int;
int_value = args[2].value.pdb_int;
if (int_value >= 0 && int_value < 256)
low_input = int_value;
else
@ -1576,7 +1567,7 @@ levels_invoker (Argument *args)
/* high input */
if (success)
{
int_value = args[4].value.pdb_int;
int_value = args[3].value.pdb_int;
if (int_value >= 0 && int_value < 256)
high_input = int_value;
else
@ -1585,7 +1576,7 @@ levels_invoker (Argument *args)
/* gamma */
if (success)
{
fp_value = args[5].value.pdb_float;
fp_value = args[4].value.pdb_float;
if (fp_value >= 0.1 && fp_value <= 10.0)
gamma = fp_value;
else
@ -1594,7 +1585,7 @@ levels_invoker (Argument *args)
/* low output */
if (success)
{
int_value = args[6].value.pdb_int;
int_value = args[5].value.pdb_int;
if (int_value >= 0 && int_value < 256)
low_output = int_value;
else
@ -1603,7 +1594,7 @@ levels_invoker (Argument *args)
/* high output */
if (success)
{
int_value = args[7].value.pdb_int;
int_value = args[6].value.pdb_int;
if (int_value >= 0 && int_value < 256)
high_output = int_value;
else

View File

@ -295,10 +295,6 @@ airbrush_non_gui_paint_func (PaintCore *paint_core,
/* The airbrush procedure definition */
ProcArg airbrush_args[] =
{
{ PDB_IMAGE,
"image",
N_("the image")
},
{ PDB_DRAWABLE,
"drawable",
N_("the drawable")
@ -329,7 +325,7 @@ ProcRecord airbrush_proc =
PDB_INTERNAL,
/* Input arguments */
5,
4,
airbrush_args,
/* Output arguments */
@ -356,25 +352,20 @@ airbrush_invoker (Argument *args)
drawable = NULL;
num_strokes = 0;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* pressure */
if (success)
{
fp_value = args[2].value.pdb_float;
fp_value = args[1].value.pdb_float;
if (fp_value >= 0.0 && fp_value <= 100.0)
non_gui_pressure = fp_value;
else
@ -383,7 +374,7 @@ airbrush_invoker (Argument *args)
/* num strokes */
if (success)
{
int_value = args[3].value.pdb_int;
int_value = args[2].value.pdb_int;
if (int_value > 0)
num_strokes = int_value / 2;
else
@ -392,7 +383,7 @@ airbrush_invoker (Argument *args)
/* point array */
if (success)
stroke_array = (double *) args[4].value.pdb_pointer;
stroke_array = (double *) args[3].value.pdb_pointer;
if (success)
/* init the paint core */

View File

@ -547,10 +547,6 @@ clone_non_gui_paint_func (PaintCore *paint_core,
/* The clone procedure definition */
ProcArg clone_args[] =
{
{ PDB_IMAGE,
"image",
N_("the image")
},
{ PDB_DRAWABLE,
"drawable",
N_("the drawable")
@ -593,7 +589,7 @@ ProcRecord clone_proc =
PDB_INTERNAL,
/* Input arguments */
8,
7,
clone_args,
/* Output arguments */
@ -621,25 +617,20 @@ clone_invoker (Argument *args)
drawable = NULL;
num_strokes = 0;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
success = FALSE;
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* the src drawable */
if (success)
{
int_value = args[2].value.pdb_int;
int_value = args[1].value.pdb_int;
src_drawable = drawable_get_ID (int_value);
if (src_drawable == NULL || gimage != drawable_gimage (src_drawable))
success = FALSE;
@ -649,7 +640,7 @@ clone_invoker (Argument *args)
/* the clone type */
if (success)
{
int_value = args[3].value.pdb_int;
int_value = args[2].value.pdb_int;
switch (int_value)
{
case 0: non_gui_type = ImageClone; break;
@ -660,13 +651,13 @@ clone_invoker (Argument *args)
/* x, y offsets */
if (success)
{
src_x = args[4].value.pdb_float;
src_y = args[5].value.pdb_float;
src_x = args[3].value.pdb_float;
src_y = args[4].value.pdb_float;
}
/* num strokes */
if (success)
{
int_value = args[6].value.pdb_int;
int_value = args[5].value.pdb_int;
if (int_value > 0)
num_strokes = int_value / 2;
else
@ -675,7 +666,7 @@ clone_invoker (Argument *args)
/* point array */
if (success)
stroke_array = (double *) args[7].value.pdb_pointer;
stroke_array = (double *) args[6].value.pdb_pointer;
if (success)
/* init the paint core */

View File

@ -424,10 +424,6 @@ convolve_non_gui_paint_func (PaintCore *paint_core,
/* The convolve procedure definition */
ProcArg convolve_args[] =
{
{ PDB_IMAGE,
"image",
N_("the image")
},
{ PDB_DRAWABLE,
"drawable",
N_("the drawable")
@ -462,7 +458,7 @@ ProcRecord convolve_proc =
PDB_INTERNAL,
/* Input arguments */
6,
5,
convolve_args,
/* Output arguments */
@ -493,25 +489,20 @@ convolve_invoker (Argument *args)
type = Blur;
num_strokes = 0;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
success = FALSE;
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* the pressure */
if (success)
{
fp_value = args[2].value.pdb_int;
fp_value = args[1].value.pdb_int;
if (fp_value >= 0.0 && fp_value <= 100.0)
pressure = fp_value;
else
@ -520,7 +511,7 @@ convolve_invoker (Argument *args)
/* the convolve type */
if (success)
{
int_value = args[3].value.pdb_int;
int_value = args[2].value.pdb_int;
switch (int_value)
{
case 0: type = Blur; break;
@ -532,7 +523,7 @@ convolve_invoker (Argument *args)
/* num strokes */
if (success)
{
int_value = args[4].value.pdb_int;
int_value = args[3].value.pdb_int;
if (int_value > 0)
num_strokes = int_value / 2;
else
@ -541,7 +532,7 @@ convolve_invoker (Argument *args)
/* point array */
if (success)
stroke_array = (double *) args[5].value.pdb_pointer;
stroke_array = (double *) args[4].value.pdb_pointer;
if (success)
/* init the paint core */

View File

@ -202,10 +202,6 @@ eraser_non_gui_paint_func (PaintCore *paint_core, GimpDrawable *drawable, int st
/* The eraser procedure definition */
ProcArg eraser_extended_args[] =
{
{ PDB_IMAGE,
"image",
N_("the image")
},
{ PDB_DRAWABLE,
"drawable",
N_("the drawable")
@ -230,10 +226,6 @@ ProcArg eraser_extended_args[] =
ProcArg eraser_args[] =
{
{ PDB_IMAGE,
"image",
N_("the image")
},
{ PDB_DRAWABLE,
"drawable",
N_("the drawable")
@ -260,7 +252,7 @@ ProcRecord eraser_proc =
PDB_INTERNAL,
/* Input arguments */
4,
3,
eraser_args,
/* Output arguments */
@ -282,7 +274,7 @@ ProcRecord eraser_extended_proc =
PDB_INTERNAL,
/* Input arguments */
6,
5,
eraser_extended_args,
/* Output arguments */
@ -308,25 +300,20 @@ eraser_invoker (args)
drawable = NULL;
num_strokes = 0;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
success = FALSE;
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* num strokes */
if (success)
{
int_value = args[2].value.pdb_int;
int_value = args[1].value.pdb_int;
if (int_value > 0)
num_strokes = int_value / 2;
else
@ -335,7 +322,7 @@ eraser_invoker (args)
/* point array */
if (success)
stroke_array = (double *) args[3].value.pdb_pointer;
stroke_array = (double *) args[2].value.pdb_pointer;
if (success)
/* init the paint core */
@ -390,25 +377,20 @@ eraser_extended_invoker (args)
drawable = NULL;
num_strokes = 0;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
success = FALSE;
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* num strokes */
if (success)
{
int_value = args[2].value.pdb_int;
int_value = args[1].value.pdb_int;
if (int_value > 0)
num_strokes = int_value / 2;
else
@ -417,7 +399,7 @@ eraser_extended_invoker (args)
/* point array */
if (success)
stroke_array = (double *) args[3].value.pdb_pointer;
stroke_array = (double *) args[2].value.pdb_pointer;
if (success)
/* init the paint core */
@ -426,8 +408,8 @@ eraser_extended_invoker (args)
if (success)
{
non_gui_hard = args[4].value.pdb_int;
non_gui_incremental = args[5].value.pdb_int;
non_gui_hard = args[3].value.pdb_int;
non_gui_incremental = args[4].value.pdb_int;
}
if (success)

View File

@ -131,10 +131,6 @@ pencil_non_gui_paint_func (PaintCore *paint_core, GimpDrawable *drawable, int st
/* The pencil procedure definition */
ProcArg pencil_args[] =
{
{ PDB_IMAGE,
"image",
"the image"
},
{ PDB_DRAWABLE,
"drawable",
"the drawable"
@ -161,7 +157,7 @@ ProcRecord pencil_proc =
PDB_INTERNAL,
/* Input arguments */
4,
3,
pencil_args,
/* Output arguments */
@ -187,25 +183,20 @@ pencil_invoker (args)
drawable = NULL;
num_strokes = 0;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
success = FALSE;
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* num strokes */
if (success)
{
int_value = args[2].value.pdb_int;
int_value = args[1].value.pdb_int;
if (int_value > 0)
num_strokes = int_value / 2;
else
@ -214,7 +205,7 @@ pencil_invoker (args)
/* point array */
if (success)
stroke_array = (double *) args[3].value.pdb_pointer;
stroke_array = (double *) args[2].value.pdb_pointer;
if (success)
/* init the paint core */

View File

@ -547,10 +547,6 @@ clone_non_gui_paint_func (PaintCore *paint_core,
/* The clone procedure definition */
ProcArg clone_args[] =
{
{ PDB_IMAGE,
"image",
N_("the image")
},
{ PDB_DRAWABLE,
"drawable",
N_("the drawable")
@ -593,7 +589,7 @@ ProcRecord clone_proc =
PDB_INTERNAL,
/* Input arguments */
8,
7,
clone_args,
/* Output arguments */
@ -621,25 +617,20 @@ clone_invoker (Argument *args)
drawable = NULL;
num_strokes = 0;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
success = FALSE;
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* the src drawable */
if (success)
{
int_value = args[2].value.pdb_int;
int_value = args[1].value.pdb_int;
src_drawable = drawable_get_ID (int_value);
if (src_drawable == NULL || gimage != drawable_gimage (src_drawable))
success = FALSE;
@ -649,7 +640,7 @@ clone_invoker (Argument *args)
/* the clone type */
if (success)
{
int_value = args[3].value.pdb_int;
int_value = args[2].value.pdb_int;
switch (int_value)
{
case 0: non_gui_type = ImageClone; break;
@ -660,13 +651,13 @@ clone_invoker (Argument *args)
/* x, y offsets */
if (success)
{
src_x = args[4].value.pdb_float;
src_y = args[5].value.pdb_float;
src_x = args[3].value.pdb_float;
src_y = args[4].value.pdb_float;
}
/* num strokes */
if (success)
{
int_value = args[6].value.pdb_int;
int_value = args[5].value.pdb_int;
if (int_value > 0)
num_strokes = int_value / 2;
else
@ -675,7 +666,7 @@ clone_invoker (Argument *args)
/* point array */
if (success)
stroke_array = (double *) args[7].value.pdb_pointer;
stroke_array = (double *) args[6].value.pdb_pointer;
if (success)
/* init the paint core */

View File

@ -244,10 +244,6 @@ paintbrush_non_gui_paint_func (PaintCore *paint_core,
/* The paintbrush procedure definition */
ProcArg paintbrush_args[] =
{
{ PDB_IMAGE,
"image",
"the image"
},
{ PDB_DRAWABLE,
"drawable",
"the drawable"
@ -268,10 +264,6 @@ ProcArg paintbrush_args[] =
ProcArg paintbrush_extended_args[] =
{
{ PDB_IMAGE,
"image",
"the image"
},
{ PDB_DRAWABLE,
"drawable",
"the drawable"
@ -306,7 +298,7 @@ ProcRecord paintbrush_proc =
PDB_INTERNAL,
/* Input arguments */
5,
4,
paintbrush_args,
/* Output arguments */
@ -328,7 +320,7 @@ ProcRecord paintbrush_extended_proc =
PDB_INTERNAL,
/* Input arguments */
6,
5,
paintbrush_extended_args,
/* Output arguments */
@ -354,25 +346,20 @@ paintbrush_invoker (Argument *args)
drawable = NULL;
num_strokes = 0;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
success = FALSE;
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* fade out */
if (success)
{
fp_value = args[2].value.pdb_float;
fp_value = args[1].value.pdb_float;
if (fp_value >= 0.0)
non_gui_fade_out = fp_value;
else
@ -381,7 +368,7 @@ paintbrush_invoker (Argument *args)
/* num strokes */
if (success)
{
int_value = args[3].value.pdb_int;
int_value = args[2].value.pdb_int;
if (int_value > 0)
num_strokes = int_value / 2;
else
@ -390,7 +377,7 @@ paintbrush_invoker (Argument *args)
/* point array */
if (success)
stroke_array = (double *) args[4].value.pdb_pointer;
stroke_array = (double *) args[3].value.pdb_pointer;
if (success)
/* init the paint core */
@ -444,25 +431,20 @@ paintbrush_extended_invoker (Argument *args)
drawable = NULL;
num_strokes = 0;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
success = FALSE;
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* fade out */
if (success)
{
fp_value = args[2].value.pdb_float;
fp_value = args[1].value.pdb_float;
if (fp_value >= 0.0)
non_gui_fade_out = fp_value;
else
@ -471,7 +453,7 @@ paintbrush_extended_invoker (Argument *args)
/* num strokes */
if (success)
{
int_value = args[3].value.pdb_int;
int_value = args[2].value.pdb_int;
if (int_value > 0)
num_strokes = int_value / 2;
else
@ -480,7 +462,7 @@ paintbrush_extended_invoker (Argument *args)
/* point array */
if (success)
stroke_array = (double *) args[4].value.pdb_pointer;
stroke_array = (double *) args[3].value.pdb_pointer;
if (success)
/* init the paint core */
@ -489,7 +471,7 @@ paintbrush_extended_invoker (Argument *args)
if (success)
{
non_gui_incremental = args[5].value.pdb_int;
non_gui_incremental = args[4].value.pdb_int;
/* set the paint core's paint func */
non_gui_paint_core.paint_func = paintbrush_non_gui_paint_func;

View File

@ -131,10 +131,6 @@ pencil_non_gui_paint_func (PaintCore *paint_core, GimpDrawable *drawable, int st
/* The pencil procedure definition */
ProcArg pencil_args[] =
{
{ PDB_IMAGE,
"image",
"the image"
},
{ PDB_DRAWABLE,
"drawable",
"the drawable"
@ -161,7 +157,7 @@ ProcRecord pencil_proc =
PDB_INTERNAL,
/* Input arguments */
4,
3,
pencil_args,
/* Output arguments */
@ -187,25 +183,20 @@ pencil_invoker (args)
drawable = NULL;
num_strokes = 0;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
success = FALSE;
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* num strokes */
if (success)
{
int_value = args[2].value.pdb_int;
int_value = args[1].value.pdb_int;
if (int_value > 0)
num_strokes = int_value / 2;
else
@ -214,7 +205,7 @@ pencil_invoker (args)
/* point array */
if (success)
stroke_array = (double *) args[3].value.pdb_pointer;
stroke_array = (double *) args[2].value.pdb_pointer;
if (success)
/* init the paint core */

View File

@ -321,10 +321,6 @@ perspective_tool_perspective (gimage, drawable, float_tiles, interpolation, matr
/* The perspective procedure definition */
ProcArg perspective_args[] =
{
{ PDB_IMAGE,
"image",
"the image"
},
{ PDB_DRAWABLE,
"drawable",
"the affected drawable"
@ -386,7 +382,7 @@ ProcRecord perspective_proc =
PDB_INTERNAL,
/* Input arguments */
11,
10,
perspective_args,
/* Output arguments */
@ -418,38 +414,33 @@ perspective_invoker (args)
drawable = NULL;
layer = NULL;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
success = FALSE;
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* interpolation */
if (success)
{
int_value = args[2].value.pdb_int;
int_value = args[1].value.pdb_int;
interpolation = (int_value) ? TRUE : FALSE;
}
/* perspective extents */
if (success)
{
trans_info[X0] = args[3].value.pdb_float;
trans_info[Y0] = args[4].value.pdb_float;
trans_info[X1] = args[5].value.pdb_float;
trans_info[Y1] = args[6].value.pdb_float;
trans_info[X2] = args[7].value.pdb_float;
trans_info[Y2] = args[8].value.pdb_float;
trans_info[X3] = args[9].value.pdb_float;
trans_info[Y3] = args[10].value.pdb_float;
trans_info[X0] = args[2].value.pdb_float;
trans_info[Y0] = args[3].value.pdb_float;
trans_info[X1] = args[4].value.pdb_float;
trans_info[Y1] = args[5].value.pdb_float;
trans_info[X2] = args[6].value.pdb_float;
trans_info[Y2] = args[7].value.pdb_float;
trans_info[X3] = args[8].value.pdb_float;
trans_info[Y3] = args[9].value.pdb_float;
}
/* call the perspective procedure */

View File

@ -452,10 +452,6 @@ posterize_levels_text_update (GtkWidget *w,
/* The posterize procedure definition */
ProcArg posterize_args[] =
{
{ PDB_IMAGE,
"image",
"the image"
},
{ PDB_DRAWABLE,
"drawable",
"the drawable"
@ -477,7 +473,7 @@ ProcRecord posterize_proc =
PDB_INTERNAL,
/* Input arguments */
3,
2,
posterize_args,
/* Output arguments */
@ -505,20 +501,15 @@ posterize_invoker (Argument *args)
drawable = NULL;
levels = 0;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
success = FALSE;
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* make sure the drawable is not indexed color */
if (success)
@ -527,7 +518,7 @@ posterize_invoker (Argument *args)
/* levels */
if (success)
{
int_value = args[2].value.pdb_int;
int_value = args[1].value.pdb_int;
if (int_value >= 2 && int_value < 256)
levels = int_value;
else

View File

@ -376,10 +376,6 @@ rotate_tool_rotate (gimage, drawable, angle, float_tiles, interpolation, matrix)
/* The rotate procedure definition */
ProcArg rotate_args[] =
{
{ PDB_IMAGE,
"image",
N_("the image")
},
{ PDB_DRAWABLE,
"drawable",
N_("the affected drawable")
@ -413,7 +409,7 @@ ProcRecord rotate_proc =
PDB_INTERNAL,
/* Input arguments */
4,
3,
rotate_args,
/* Output arguments */
@ -445,30 +441,25 @@ rotate_invoker (args)
drawable = NULL;
layer = NULL;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
success = FALSE;
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* interpolation */
if (success)
{
int_value = args[2].value.pdb_int;
int_value = args[1].value.pdb_int;
interpolation = (int_value) ? TRUE : FALSE;
}
/* angle of rotation */
if (success)
angle = args[3].value.pdb_float;
angle = args[2].value.pdb_float;
/* call the rotate procedure */
if (success)

View File

@ -438,10 +438,6 @@ scale_tool_scale (gimage, drawable, trans_info, float_tiles, interpolation, matr
/* The scale procedure definition */
ProcArg scale_args[] =
{
{ PDB_IMAGE,
"image",
N_("the image")
},
{ PDB_DRAWABLE,
"drawable",
N_("the affected drawable")
@ -487,7 +483,7 @@ ProcRecord scale_proc =
PDB_INTERNAL,
/* Input arguments */
7,
6,
scale_args,
/* Output arguments */
@ -519,34 +515,29 @@ scale_invoker (args)
drawable = NULL;
layer = NULL;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
success = FALSE;
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* interpolation */
if (success)
{
int_value = args[2].value.pdb_int;
int_value = args[1].value.pdb_int;
interpolation = (int_value) ? TRUE : FALSE;
}
/* scale extents */
if (success)
{
trans_info[X1] = args[3].value.pdb_float;
trans_info[Y1] = args[4].value.pdb_float;
trans_info[X2] = args[5].value.pdb_float;
trans_info[Y2] = args[6].value.pdb_float;
trans_info[X1] = args[2].value.pdb_float;
trans_info[Y1] = args[3].value.pdb_float;
trans_info[X2] = args[4].value.pdb_float;
trans_info[Y2] = args[5].value.pdb_float;
if (trans_info[X1] >= trans_info[X2] ||
trans_info[Y1] >= trans_info[Y2])

View File

@ -363,10 +363,6 @@ shear_tool_shear (gimage, drawable, float_tiles, interpolation, matrix)
/* The shear procedure definition */
ProcArg shear_args[] =
{
{ PDB_IMAGE,
"image",
N_("the image")
},
{ PDB_DRAWABLE,
"drawable",
N_("the affected drawable")
@ -404,7 +400,7 @@ ProcRecord shear_proc =
PDB_INTERNAL,
/* Input arguments */
5,
4,
shear_args,
/* Output arguments */
@ -438,31 +434,26 @@ shear_invoker (args)
shear_type = HORZ;
layer = NULL;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
success = FALSE;
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* interpolation */
if (success)
{
int_value = args[2].value.pdb_int;
int_value = args[1].value.pdb_int;
interpolation = (int_value) ? TRUE : FALSE;
}
/* shear type */
if (success)
{
int_value = args[3].value.pdb_int;
int_value = args[2].value.pdb_int;
switch (int_value)
{
case 0: shear_type = HORZ; break;
@ -473,7 +464,7 @@ shear_invoker (args)
/* shear extents */
if (success)
{
shear_magnitude = args[4].value.pdb_float;
shear_magnitude = args[3].value.pdb_float;
}
/* call the shear procedure */

View File

@ -611,10 +611,6 @@ threshold_high_threshold_text_update (GtkWidget *w,
/* The threshold procedure definition */
ProcArg threshold_args[] =
{
{ PDB_IMAGE,
"image",
N_("the image")
},
{ PDB_DRAWABLE,
"drawable",
N_("the drawable")
@ -640,7 +636,7 @@ ProcRecord threshold_proc =
PDB_INTERNAL,
/* Input arguments */
4,
3,
threshold_args,
/* Output arguments */
@ -671,20 +667,15 @@ threshold_invoker (args)
low_threshold = 0;
high_threshold = 0;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
success = FALSE;
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* make sure the drawable is not indexed color */
if (success)
@ -693,7 +684,7 @@ threshold_invoker (args)
/* low threhsold */
if (success)
{
int_value = args[2].value.pdb_int;
int_value = args[1].value.pdb_int;
if (int_value >= 0 && int_value < 256)
low_threshold = int_value;
else
@ -702,7 +693,7 @@ threshold_invoker (args)
/* high threhsold */
if (success)
{
int_value = args[3].value.pdb_int;
int_value = args[2].value.pdb_int;
if (int_value >= 0 && int_value < 256)
high_threshold = int_value;
else

View File

@ -295,10 +295,6 @@ airbrush_non_gui_paint_func (PaintCore *paint_core,
/* The airbrush procedure definition */
ProcArg airbrush_args[] =
{
{ PDB_IMAGE,
"image",
N_("the image")
},
{ PDB_DRAWABLE,
"drawable",
N_("the drawable")
@ -329,7 +325,7 @@ ProcRecord airbrush_proc =
PDB_INTERNAL,
/* Input arguments */
5,
4,
airbrush_args,
/* Output arguments */
@ -356,25 +352,20 @@ airbrush_invoker (Argument *args)
drawable = NULL;
num_strokes = 0;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* pressure */
if (success)
{
fp_value = args[2].value.pdb_float;
fp_value = args[1].value.pdb_float;
if (fp_value >= 0.0 && fp_value <= 100.0)
non_gui_pressure = fp_value;
else
@ -383,7 +374,7 @@ airbrush_invoker (Argument *args)
/* num strokes */
if (success)
{
int_value = args[3].value.pdb_int;
int_value = args[2].value.pdb_int;
if (int_value > 0)
num_strokes = int_value / 2;
else
@ -392,7 +383,7 @@ airbrush_invoker (Argument *args)
/* point array */
if (success)
stroke_array = (double *) args[4].value.pdb_pointer;
stroke_array = (double *) args[3].value.pdb_pointer;
if (success)
/* init the paint core */

View File

@ -618,7 +618,6 @@ blend_button_release (Tool *tool,
{
return_vals = procedural_db_run_proc ("gimp_blend",
&nreturn_vals,
PDB_IMAGE, pdb_image_to_id(gimage),
PDB_DRAWABLE, drawable_ID (gimage_active_drawable (gimage)),
PDB_INT32, (gint32) blend_options->blend_mode,
PDB_INT32, (gint32) blend_options->paint_mode,
@ -1711,10 +1710,6 @@ tools_free_blend (Tool *tool)
/* The blend procedure definition */
ProcArg blend_args[] =
{
{ PDB_IMAGE,
"image",
N_("The image")
},
{ PDB_DRAWABLE,
"drawable",
N_("The affected drawable")
@ -1784,7 +1779,7 @@ ProcRecord blend_proc =
PDB_INTERNAL,
/* Input arguments */
15,
14,
blend_args,
/* Output arguments */
@ -1826,25 +1821,20 @@ blend_invoker (Argument *args)
max_depth = 0;
threshold = 0.0;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* blend mode */
if (success)
{
int_value = args[2].value.pdb_int;
int_value = args[1].value.pdb_int;
switch (int_value)
{
case 0: blend_mode = FG_BG_RGB_MODE; break;
@ -1857,7 +1847,7 @@ blend_invoker (Argument *args)
/* paint mode */
if (success)
{
int_value = args[3].value.pdb_int;
int_value = args[2].value.pdb_int;
if (int_value >= NORMAL_MODE && int_value <= VALUE_MODE)
paint_mode = int_value;
else
@ -1866,7 +1856,7 @@ blend_invoker (Argument *args)
/* gradient type */
if (success)
{
int_value = args[4].value.pdb_int;
int_value = args[3].value.pdb_int;
switch (int_value)
{
case 0: gradient_type = Linear; break;
@ -1884,7 +1874,7 @@ blend_invoker (Argument *args)
/* opacity */
if (success)
{
fp_value = args[5].value.pdb_float;
fp_value = args[4].value.pdb_float;
if (fp_value >= 0.0 && fp_value <= 100.0)
opacity = fp_value;
else
@ -1893,7 +1883,7 @@ blend_invoker (Argument *args)
/* offset */
if (success)
{
fp_value = args[6].value.pdb_float;
fp_value = args[5].value.pdb_float;
if (fp_value >= 0.0)
offset = fp_value;
else
@ -1902,7 +1892,7 @@ blend_invoker (Argument *args)
/* repeat */
if (success)
{
int_value = args[7].value.pdb_int;
int_value = args[6].value.pdb_int;
switch (int_value)
{
case 0: repeat = REPEAT_NONE; break;
@ -1914,14 +1904,14 @@ blend_invoker (Argument *args)
/* supersampling */
if (success)
{
int_value = args[8].value.pdb_int;
int_value = args[7].value.pdb_int;
supersample = (int_value ? TRUE : FALSE);
}
/* max_depth */
if (success)
{
int_value = args[9].value.pdb_int;
int_value = args[8].value.pdb_int;
if (((int_value >= 1) && (int_value <= 9)) || !supersample)
max_depth = int_value;
@ -1931,7 +1921,7 @@ blend_invoker (Argument *args)
/* threshold */
if (success)
{
fp_value = args[10].value.pdb_float;
fp_value = args[9].value.pdb_float;
if (((fp_value >= 0.0) && (fp_value <= 4.0)) || !supersample)
threshold = fp_value;
@ -1941,10 +1931,10 @@ blend_invoker (Argument *args)
/* x1, y1, x2, y2 */
if (success)
{
x1 = args[11].value.pdb_float;
y1 = args[12].value.pdb_float;
x2 = args[13].value.pdb_float;
y2 = args[14].value.pdb_float;
x1 = args[10].value.pdb_float;
y1 = args[11].value.pdb_float;
x2 = args[12].value.pdb_float;
y2 = args[13].value.pdb_float;
}
/* call the blend procedure */

View File

@ -643,10 +643,6 @@ brightness_contrast_contrast_text_update (GtkWidget *w,
/* The brightness_contrast procedure definition */
ProcArg brightness_contrast_args[] =
{
{ PDB_IMAGE,
"image",
N_("the image")
},
{ PDB_DRAWABLE,
"drawable",
N_("the drawable")
@ -672,7 +668,7 @@ ProcRecord brightness_contrast_proc =
PDB_INTERNAL,
/* Input arguments */
4,
3,
brightness_contrast_args,
/* Output arguments */
@ -702,20 +698,15 @@ brightness_contrast_invoker (Argument *args)
brightness = 0;
contrast = 0;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* make sure the drawable is not indexed color */
if (success)
@ -724,7 +715,7 @@ brightness_contrast_invoker (Argument *args)
/* brightness */
if (success)
{
int_value = args[2].value.pdb_int;
int_value = args[1].value.pdb_int;
if (int_value < -127 || int_value > 127)
success = FALSE;
else
@ -733,7 +724,7 @@ brightness_contrast_invoker (Argument *args)
/* contrast */
if (success)
{
int_value = args[3].value.pdb_int;
int_value = args[2].value.pdb_int;
if (int_value < -127 || int_value > 127)
success = FALSE;
else

View File

@ -315,8 +315,6 @@ bucket_fill_button_release (tool, bevent, gdisp_ptr)
return_vals = procedural_db_run_proc ("gimp_bucket_fill",
&nreturn_vals,
PDB_IMAGE,
pdb_image_to_id(gdisp->gimage),
PDB_DRAWABLE, drawable_ID (gimage_active_drawable (gdisp->gimage)),
PDB_INT32, (gint32) fill_mode,
PDB_INT32, (gint32) bucket_options->paint_mode,
@ -698,10 +696,6 @@ tools_free_bucket_fill (tool)
/* The bucket fill procedure definition */
ProcArg bucket_fill_args[] =
{
{ PDB_IMAGE,
"image",
N_("the image")
},
{ PDB_DRAWABLE,
"drawable",
N_("the affected drawable")
@ -747,7 +741,7 @@ ProcRecord bucket_fill_proc =
PDB_INTERNAL,
/* Input arguments */
9,
8,
bucket_fill_args,
/* Output arguments */
@ -781,25 +775,20 @@ bucket_fill_invoker (args)
opacity = 100.0;
threshold = 0.0;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* fill mode */
if (success)
{
int_value = args[2].value.pdb_int;
int_value = args[1].value.pdb_int;
switch (int_value)
{
case 0: fill_mode = FgColorFill; break;
@ -811,7 +800,7 @@ bucket_fill_invoker (args)
/* paint mode */
if (success)
{
int_value = args[3].value.pdb_int;
int_value = args[2].value.pdb_int;
if (int_value >= NORMAL_MODE && int_value <= VALUE_MODE)
paint_mode = int_value;
else
@ -820,7 +809,7 @@ bucket_fill_invoker (args)
/* opacity */
if (success)
{
fp_value = args[4].value.pdb_float;
fp_value = args[3].value.pdb_float;
if (fp_value >= 0.0 && fp_value <= 100.0)
opacity = fp_value;
else
@ -829,7 +818,7 @@ bucket_fill_invoker (args)
/* threshold */
if (success)
{
fp_value = args[5].value.pdb_float;
fp_value = args[4].value.pdb_float;
if (fp_value >= 0.0 && fp_value <= 255.0)
threshold = fp_value;
else
@ -838,7 +827,7 @@ bucket_fill_invoker (args)
/* sample_merged */
if (success)
{
int_value = args[6].value.pdb_int;
int_value = args[5].value.pdb_int;
sample_merged = (int_value) ? TRUE : FALSE;
}
/* x, y */

View File

@ -971,10 +971,6 @@ by_color_select_preview_button_press (ByColorDialog *bcd,
/* The by_color_select procedure definition */
ProcArg by_color_select_args[] =
{
{ PDB_IMAGE,
"image",
N_("the image")
},
{ PDB_DRAWABLE,
"drawable",
N_("the drawable")
@ -1020,7 +1016,7 @@ ProcRecord by_color_select_proc =
PDB_INTERNAL,
/* Input arguments */
9,
8,
by_color_select_args,
/* Output arguments */
@ -1051,20 +1047,15 @@ by_color_select_invoker (Argument *args)
op = REPLACE;
threshold = 0;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
success = FALSE;
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* color */
if (success)
@ -1072,14 +1063,14 @@ by_color_select_invoker (Argument *args)
int i;
unsigned char *color_array;
color_array = (unsigned char *) args[2].value.pdb_pointer;
color_array = (unsigned char *) args[1].value.pdb_pointer;
for (i = 0; i < 3; i++)
color[i] = color_array[i];
}
/* threshold */
if (success)
{
int_value = args[3].value.pdb_int;
int_value = args[2].value.pdb_int;
if (int_value >= 0 && int_value <= 255)
threshold = int_value;
else
@ -1088,7 +1079,7 @@ by_color_select_invoker (Argument *args)
/* operation */
if (success)
{
int_value = args[4].value.pdb_int;
int_value = args[3].value.pdb_int;
switch (int_value)
{
case 0: op = ADD; break;
@ -1101,24 +1092,24 @@ by_color_select_invoker (Argument *args)
/* antialiasing? */
if (success)
{
int_value = args[5].value.pdb_int;
int_value = args[4].value.pdb_int;
antialias = (int_value) ? TRUE : FALSE;
}
/* feathering */
if (success)
{
int_value = args[6].value.pdb_int;
int_value = args[5].value.pdb_int;
feather = (int_value) ? TRUE : FALSE;
}
/* feather radius */
if (success)
{
feather_radius = args[7].value.pdb_float;
feather_radius = args[6].value.pdb_float;
}
/* sample merged */
if (success)
{
int_value = args[8].value.pdb_int;
int_value = args[7].value.pdb_int;
sample_merged = (int_value) ? TRUE : FALSE;
}

View File

@ -547,10 +547,6 @@ clone_non_gui_paint_func (PaintCore *paint_core,
/* The clone procedure definition */
ProcArg clone_args[] =
{
{ PDB_IMAGE,
"image",
N_("the image")
},
{ PDB_DRAWABLE,
"drawable",
N_("the drawable")
@ -593,7 +589,7 @@ ProcRecord clone_proc =
PDB_INTERNAL,
/* Input arguments */
8,
7,
clone_args,
/* Output arguments */
@ -621,25 +617,20 @@ clone_invoker (Argument *args)
drawable = NULL;
num_strokes = 0;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
success = FALSE;
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* the src drawable */
if (success)
{
int_value = args[2].value.pdb_int;
int_value = args[1].value.pdb_int;
src_drawable = drawable_get_ID (int_value);
if (src_drawable == NULL || gimage != drawable_gimage (src_drawable))
success = FALSE;
@ -649,7 +640,7 @@ clone_invoker (Argument *args)
/* the clone type */
if (success)
{
int_value = args[3].value.pdb_int;
int_value = args[2].value.pdb_int;
switch (int_value)
{
case 0: non_gui_type = ImageClone; break;
@ -660,13 +651,13 @@ clone_invoker (Argument *args)
/* x, y offsets */
if (success)
{
src_x = args[4].value.pdb_float;
src_y = args[5].value.pdb_float;
src_x = args[3].value.pdb_float;
src_y = args[4].value.pdb_float;
}
/* num strokes */
if (success)
{
int_value = args[6].value.pdb_int;
int_value = args[5].value.pdb_int;
if (int_value > 0)
num_strokes = int_value / 2;
else
@ -675,7 +666,7 @@ clone_invoker (Argument *args)
/* point array */
if (success)
stroke_array = (double *) args[7].value.pdb_pointer;
stroke_array = (double *) args[6].value.pdb_pointer;
if (success)
/* init the paint core */

View File

@ -877,10 +877,6 @@ color_balance_yb_text_update (GtkWidget *w,
/* The color_balance procedure definition */
ProcArg color_balance_args[] =
{
{ PDB_IMAGE,
"image",
N_("the image")
},
{ PDB_DRAWABLE,
"drawable",
N_("the drawable")
@ -918,7 +914,7 @@ ProcRecord color_balance_proc =
PDB_INTERNAL,
/* Input arguments */
7,
6,
color_balance_args,
/* Output arguments */
@ -955,20 +951,15 @@ color_balance_invoker (Argument *args)
magenta_green = 0;
yellow_blue = 0;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
success = FALSE;
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* make sure the drawable is not indexed color */
if (success)
@ -977,7 +968,7 @@ color_balance_invoker (Argument *args)
/* transfer_mode */
if (success)
{
int_value = args[2].value.pdb_int;
int_value = args[1].value.pdb_int;
switch (int_value)
{
case 0: transfer_mode = SHADOWS; break;
@ -989,13 +980,13 @@ color_balance_invoker (Argument *args)
/* preserve_lum */
if (success)
{
int_value = args[3].value.pdb_int;
int_value = args[2].value.pdb_int;
preserve_lum = (int_value) ? TRUE : FALSE;
}
/* cyan_red */
if (success)
{
fp_value = args[4].value.pdb_float;
fp_value = args[3].value.pdb_float;
if (fp_value >= -100 && fp_value <= 100)
cyan_red = fp_value;
else
@ -1004,7 +995,7 @@ color_balance_invoker (Argument *args)
/* magenta_green */
if (success)
{
fp_value = args[5].value.pdb_float;
fp_value = args[4].value.pdb_float;
if (fp_value >= -100 && fp_value <= 100)
magenta_green = fp_value;
else
@ -1013,7 +1004,7 @@ color_balance_invoker (Argument *args)
/* yellow_blue */
if (success)
{
fp_value = args[6].value.pdb_float;
fp_value = args[5].value.pdb_float;
if (fp_value >= -100 && fp_value <= 100)
yellow_blue = fp_value;
else

View File

@ -475,10 +475,6 @@ tools_free_color_picker (Tool *tool)
/* The color_picker procedure definition */
ProcArg color_picker_args[] =
{
{ PDB_IMAGE,
"image",
N_("the image")
},
{ PDB_DRAWABLE,
"drawable",
N_("the drawable")
@ -520,7 +516,7 @@ ProcRecord color_picker_proc =
PDB_INTERNAL,
/* Input arguments */
6,
5,
color_picker_args,
/* Output arguments */
@ -551,35 +547,32 @@ color_picker_invoker (Argument *args)
sample_merged = FALSE;
save_color = COLOR_UPDATE;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if ((gimage = gimage_get_ID (int_value)) == NULL)
success = FALSE;
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* x, y */
if (success)
{
x = args[2].value.pdb_float;
y = args[3].value.pdb_float;
x = args[1].value.pdb_float;
y = args[2].value.pdb_float;
}
/* sample_merged */
if (success)
{
int_value = args[4].value.pdb_int;
int_value = args[3].value.pdb_int;
sample_merged = (int_value) ? TRUE : FALSE;
}
/* save_color */
if (success)
{
int_value = args[5].value.pdb_int;
int_value = args[4].value.pdb_int;
save_color = (int_value) ? COLOR_NEW : COLOR_UPDATE;
}

View File

@ -424,10 +424,6 @@ convolve_non_gui_paint_func (PaintCore *paint_core,
/* The convolve procedure definition */
ProcArg convolve_args[] =
{
{ PDB_IMAGE,
"image",
N_("the image")
},
{ PDB_DRAWABLE,
"drawable",
N_("the drawable")
@ -462,7 +458,7 @@ ProcRecord convolve_proc =
PDB_INTERNAL,
/* Input arguments */
6,
5,
convolve_args,
/* Output arguments */
@ -493,25 +489,20 @@ convolve_invoker (Argument *args)
type = Blur;
num_strokes = 0;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
success = FALSE;
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* the pressure */
if (success)
{
fp_value = args[2].value.pdb_int;
fp_value = args[1].value.pdb_int;
if (fp_value >= 0.0 && fp_value <= 100.0)
pressure = fp_value;
else
@ -520,7 +511,7 @@ convolve_invoker (Argument *args)
/* the convolve type */
if (success)
{
int_value = args[3].value.pdb_int;
int_value = args[2].value.pdb_int;
switch (int_value)
{
case 0: type = Blur; break;
@ -532,7 +523,7 @@ convolve_invoker (Argument *args)
/* num strokes */
if (success)
{
int_value = args[4].value.pdb_int;
int_value = args[3].value.pdb_int;
if (int_value > 0)
num_strokes = int_value / 2;
else
@ -541,7 +532,7 @@ convolve_invoker (Argument *args)
/* point array */
if (success)
stroke_array = (double *) args[5].value.pdb_pointer;
stroke_array = (double *) args[4].value.pdb_pointer;
if (success)
/* init the paint core */

View File

@ -1298,10 +1298,6 @@ curves_CR_compose (CRMatrix a,
/* Procedure for defining the curve with a spline */
ProcArg curves_spline_args[] =
{
{ PDB_IMAGE,
"image",
N_("the image")
},
{ PDB_DRAWABLE,
"drawable",
N_("the drawable")
@ -1331,7 +1327,7 @@ ProcRecord curves_spline_proc =
PDB_INTERNAL,
/* Input arguments */
5,
4,
curves_spline_args,
/* Output arguments */
@ -1359,20 +1355,15 @@ curves_spline_invoker (Argument *args)
void *pr;
GimpDrawable *drawable;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
success = FALSE;
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* make sure the drawable is not indexed color */
if (success)
@ -1382,7 +1373,7 @@ curves_spline_invoker (Argument *args)
/* channel */
if (success)
{
int_value = args[2].value.pdb_int;
int_value = args[1].value.pdb_int;
if (success)
{
if (drawable_gray (drawable))
@ -1402,14 +1393,14 @@ curves_spline_invoker (Argument *args)
}
if (success)
{
num_cp = args[3].value.pdb_int;
num_cp = args[2].value.pdb_int;
if (num_cp < 4 || num_cp > 32 || (num_cp & 0x1))
success = FALSE;
}
/* control points */
if (success)
{
control_pts = (unsigned char *) args[4].value.pdb_pointer;
control_pts = (unsigned char *) args[3].value.pdb_pointer;
}
/* arrange to modify the curves */
@ -1456,10 +1447,6 @@ curves_spline_invoker (Argument *args)
/* Procedure for explicitly defining the curve */
ProcArg curves_explicit_args[] =
{
{ PDB_IMAGE,
"image",
N_("the image")
},
{ PDB_DRAWABLE,
"drawable",
N_("the drawable")
@ -1489,7 +1476,7 @@ ProcRecord curves_explicit_proc =
PDB_INTERNAL,
/* Input arguments */
5,
4,
curves_explicit_args,
/* Output arguments */
@ -1516,20 +1503,15 @@ curves_explicit_invoker (Argument *args)
void *pr;
GimpDrawable *drawable;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
success = FALSE;
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* make sure the drawable is not indexed color */
if (success)
@ -1538,7 +1520,7 @@ curves_explicit_invoker (Argument *args)
/* channel */
if (success)
{
int_value = args[2].value.pdb_int;
int_value = args[1].value.pdb_int;
if (success)
{
if (drawable_gray (drawable))
@ -1559,14 +1541,14 @@ curves_explicit_invoker (Argument *args)
/* the number of bytes */
if (success)
{
int_value = args[3].value.pdb_int;
int_value = args[2].value.pdb_int;
if (int_value != 256)
success = FALSE;
}
/* the curve */
if (success)
{
curve = (unsigned char *) args[4].value.pdb_pointer;
curve = (unsigned char *) args[3].value.pdb_pointer;
}
/* arrange to modify the curves */

View File

@ -202,10 +202,6 @@ eraser_non_gui_paint_func (PaintCore *paint_core, GimpDrawable *drawable, int st
/* The eraser procedure definition */
ProcArg eraser_extended_args[] =
{
{ PDB_IMAGE,
"image",
N_("the image")
},
{ PDB_DRAWABLE,
"drawable",
N_("the drawable")
@ -230,10 +226,6 @@ ProcArg eraser_extended_args[] =
ProcArg eraser_args[] =
{
{ PDB_IMAGE,
"image",
N_("the image")
},
{ PDB_DRAWABLE,
"drawable",
N_("the drawable")
@ -260,7 +252,7 @@ ProcRecord eraser_proc =
PDB_INTERNAL,
/* Input arguments */
4,
3,
eraser_args,
/* Output arguments */
@ -282,7 +274,7 @@ ProcRecord eraser_extended_proc =
PDB_INTERNAL,
/* Input arguments */
6,
5,
eraser_extended_args,
/* Output arguments */
@ -308,25 +300,20 @@ eraser_invoker (args)
drawable = NULL;
num_strokes = 0;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
success = FALSE;
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* num strokes */
if (success)
{
int_value = args[2].value.pdb_int;
int_value = args[1].value.pdb_int;
if (int_value > 0)
num_strokes = int_value / 2;
else
@ -335,7 +322,7 @@ eraser_invoker (args)
/* point array */
if (success)
stroke_array = (double *) args[3].value.pdb_pointer;
stroke_array = (double *) args[2].value.pdb_pointer;
if (success)
/* init the paint core */
@ -390,25 +377,20 @@ eraser_extended_invoker (args)
drawable = NULL;
num_strokes = 0;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
success = FALSE;
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* num strokes */
if (success)
{
int_value = args[2].value.pdb_int;
int_value = args[1].value.pdb_int;
if (int_value > 0)
num_strokes = int_value / 2;
else
@ -417,7 +399,7 @@ eraser_extended_invoker (args)
/* point array */
if (success)
stroke_array = (double *) args[3].value.pdb_pointer;
stroke_array = (double *) args[2].value.pdb_pointer;
if (success)
/* init the paint core */
@ -426,8 +408,8 @@ eraser_extended_invoker (args)
if (success)
{
non_gui_hard = args[4].value.pdb_int;
non_gui_incremental = args[5].value.pdb_int;
non_gui_hard = args[3].value.pdb_int;
non_gui_incremental = args[4].value.pdb_int;
}
if (success)

View File

@ -332,10 +332,6 @@ flip_change_type (int new_type)
/* The flip procedure definition */
ProcArg flip_args[] =
{
{ PDB_IMAGE,
"image",
N_("the image")
},
{ PDB_DRAWABLE,
"drawable",
N_("the affected drawable")
@ -365,7 +361,7 @@ ProcRecord flip_proc =
PDB_INTERNAL,
/* Input arguments */
3,
2,
flip_args,
/* Output arguments */
@ -395,25 +391,20 @@ flip_invoker (Argument *args)
new_tiles = NULL;
layer = NULL;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
success = FALSE;
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* flip type */
if (success)
{
int_value = args[2].value.pdb_int;
int_value = args[1].value.pdb_int;
switch (int_value)
{
case 0: flip_type = 0; break;

View File

@ -579,10 +579,6 @@ tools_free_fuzzy_select (Tool *tool)
/* The fuzzy_select procedure definition */
ProcArg fuzzy_select_args[] =
{
{ PDB_IMAGE,
"image",
"the image"
},
{ PDB_DRAWABLE,
"drawable",
"the drawable"
@ -632,7 +628,7 @@ ProcRecord fuzzy_select_proc =
PDB_INTERNAL,
/* Input arguments */
10,
9,
fuzzy_select_args,
/* Output arguments */
@ -663,31 +659,26 @@ fuzzy_select_invoker (Argument *args)
op = REPLACE;
threshold = 0;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
success = FALSE;
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* x, y */
if (success)
{
x = args[2].value.pdb_float;
y = args[3].value.pdb_float;
x = args[1].value.pdb_float;
y = args[2].value.pdb_float;
}
/* threshold */
if (success)
{
int_value = args[4].value.pdb_int;
int_value = args[3].value.pdb_int;
if (int_value >= 0 && int_value <= 255)
threshold = int_value;
else
@ -696,7 +687,7 @@ fuzzy_select_invoker (Argument *args)
/* operation */
if (success)
{
int_value = args[5].value.pdb_int;
int_value = args[4].value.pdb_int;
switch (int_value)
{
case 0: op = ADD; break;
@ -709,24 +700,24 @@ fuzzy_select_invoker (Argument *args)
/* antialiasing? */
if (success)
{
int_value = args[6].value.pdb_int;
int_value = args[5].value.pdb_int;
antialias = (int_value) ? TRUE : FALSE;
}
/* feathering */
if (success)
{
int_value = args[7].value.pdb_int;
int_value = args[6].value.pdb_int;
feather = (int_value) ? TRUE : FALSE;
}
/* feather radius */
if (success)
{
feather_radius = args[8].value.pdb_float;
feather_radius = args[7].value.pdb_float;
}
/* sample merged */
if (success)
{
int_value = args[9].value.pdb_int;
int_value = args[8].value.pdb_int;
sample_merged = (int_value) ? TRUE : FALSE;
}

View File

@ -295,10 +295,6 @@ airbrush_non_gui_paint_func (PaintCore *paint_core,
/* The airbrush procedure definition */
ProcArg airbrush_args[] =
{
{ PDB_IMAGE,
"image",
N_("the image")
},
{ PDB_DRAWABLE,
"drawable",
N_("the drawable")
@ -329,7 +325,7 @@ ProcRecord airbrush_proc =
PDB_INTERNAL,
/* Input arguments */
5,
4,
airbrush_args,
/* Output arguments */
@ -356,25 +352,20 @@ airbrush_invoker (Argument *args)
drawable = NULL;
num_strokes = 0;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* pressure */
if (success)
{
fp_value = args[2].value.pdb_float;
fp_value = args[1].value.pdb_float;
if (fp_value >= 0.0 && fp_value <= 100.0)
non_gui_pressure = fp_value;
else
@ -383,7 +374,7 @@ airbrush_invoker (Argument *args)
/* num strokes */
if (success)
{
int_value = args[3].value.pdb_int;
int_value = args[2].value.pdb_int;
if (int_value > 0)
num_strokes = int_value / 2;
else
@ -392,7 +383,7 @@ airbrush_invoker (Argument *args)
/* point array */
if (success)
stroke_array = (double *) args[4].value.pdb_pointer;
stroke_array = (double *) args[3].value.pdb_pointer;
if (success)
/* init the paint core */

View File

@ -618,7 +618,6 @@ blend_button_release (Tool *tool,
{
return_vals = procedural_db_run_proc ("gimp_blend",
&nreturn_vals,
PDB_IMAGE, pdb_image_to_id(gimage),
PDB_DRAWABLE, drawable_ID (gimage_active_drawable (gimage)),
PDB_INT32, (gint32) blend_options->blend_mode,
PDB_INT32, (gint32) blend_options->paint_mode,
@ -1711,10 +1710,6 @@ tools_free_blend (Tool *tool)
/* The blend procedure definition */
ProcArg blend_args[] =
{
{ PDB_IMAGE,
"image",
N_("The image")
},
{ PDB_DRAWABLE,
"drawable",
N_("The affected drawable")
@ -1784,7 +1779,7 @@ ProcRecord blend_proc =
PDB_INTERNAL,
/* Input arguments */
15,
14,
blend_args,
/* Output arguments */
@ -1826,25 +1821,20 @@ blend_invoker (Argument *args)
max_depth = 0;
threshold = 0.0;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* blend mode */
if (success)
{
int_value = args[2].value.pdb_int;
int_value = args[1].value.pdb_int;
switch (int_value)
{
case 0: blend_mode = FG_BG_RGB_MODE; break;
@ -1857,7 +1847,7 @@ blend_invoker (Argument *args)
/* paint mode */
if (success)
{
int_value = args[3].value.pdb_int;
int_value = args[2].value.pdb_int;
if (int_value >= NORMAL_MODE && int_value <= VALUE_MODE)
paint_mode = int_value;
else
@ -1866,7 +1856,7 @@ blend_invoker (Argument *args)
/* gradient type */
if (success)
{
int_value = args[4].value.pdb_int;
int_value = args[3].value.pdb_int;
switch (int_value)
{
case 0: gradient_type = Linear; break;
@ -1884,7 +1874,7 @@ blend_invoker (Argument *args)
/* opacity */
if (success)
{
fp_value = args[5].value.pdb_float;
fp_value = args[4].value.pdb_float;
if (fp_value >= 0.0 && fp_value <= 100.0)
opacity = fp_value;
else
@ -1893,7 +1883,7 @@ blend_invoker (Argument *args)
/* offset */
if (success)
{
fp_value = args[6].value.pdb_float;
fp_value = args[5].value.pdb_float;
if (fp_value >= 0.0)
offset = fp_value;
else
@ -1902,7 +1892,7 @@ blend_invoker (Argument *args)
/* repeat */
if (success)
{
int_value = args[7].value.pdb_int;
int_value = args[6].value.pdb_int;
switch (int_value)
{
case 0: repeat = REPEAT_NONE; break;
@ -1914,14 +1904,14 @@ blend_invoker (Argument *args)
/* supersampling */
if (success)
{
int_value = args[8].value.pdb_int;
int_value = args[7].value.pdb_int;
supersample = (int_value ? TRUE : FALSE);
}
/* max_depth */
if (success)
{
int_value = args[9].value.pdb_int;
int_value = args[8].value.pdb_int;
if (((int_value >= 1) && (int_value <= 9)) || !supersample)
max_depth = int_value;
@ -1931,7 +1921,7 @@ blend_invoker (Argument *args)
/* threshold */
if (success)
{
fp_value = args[10].value.pdb_float;
fp_value = args[9].value.pdb_float;
if (((fp_value >= 0.0) && (fp_value <= 4.0)) || !supersample)
threshold = fp_value;
@ -1941,10 +1931,10 @@ blend_invoker (Argument *args)
/* x1, y1, x2, y2 */
if (success)
{
x1 = args[11].value.pdb_float;
y1 = args[12].value.pdb_float;
x2 = args[13].value.pdb_float;
y2 = args[14].value.pdb_float;
x1 = args[10].value.pdb_float;
y1 = args[11].value.pdb_float;
x2 = args[12].value.pdb_float;
y2 = args[13].value.pdb_float;
}
/* call the blend procedure */

View File

@ -643,10 +643,6 @@ brightness_contrast_contrast_text_update (GtkWidget *w,
/* The brightness_contrast procedure definition */
ProcArg brightness_contrast_args[] =
{
{ PDB_IMAGE,
"image",
N_("the image")
},
{ PDB_DRAWABLE,
"drawable",
N_("the drawable")
@ -672,7 +668,7 @@ ProcRecord brightness_contrast_proc =
PDB_INTERNAL,
/* Input arguments */
4,
3,
brightness_contrast_args,
/* Output arguments */
@ -702,20 +698,15 @@ brightness_contrast_invoker (Argument *args)
brightness = 0;
contrast = 0;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* make sure the drawable is not indexed color */
if (success)
@ -724,7 +715,7 @@ brightness_contrast_invoker (Argument *args)
/* brightness */
if (success)
{
int_value = args[2].value.pdb_int;
int_value = args[1].value.pdb_int;
if (int_value < -127 || int_value > 127)
success = FALSE;
else
@ -733,7 +724,7 @@ brightness_contrast_invoker (Argument *args)
/* contrast */
if (success)
{
int_value = args[3].value.pdb_int;
int_value = args[2].value.pdb_int;
if (int_value < -127 || int_value > 127)
success = FALSE;
else

View File

@ -315,8 +315,6 @@ bucket_fill_button_release (tool, bevent, gdisp_ptr)
return_vals = procedural_db_run_proc ("gimp_bucket_fill",
&nreturn_vals,
PDB_IMAGE,
pdb_image_to_id(gdisp->gimage),
PDB_DRAWABLE, drawable_ID (gimage_active_drawable (gdisp->gimage)),
PDB_INT32, (gint32) fill_mode,
PDB_INT32, (gint32) bucket_options->paint_mode,
@ -698,10 +696,6 @@ tools_free_bucket_fill (tool)
/* The bucket fill procedure definition */
ProcArg bucket_fill_args[] =
{
{ PDB_IMAGE,
"image",
N_("the image")
},
{ PDB_DRAWABLE,
"drawable",
N_("the affected drawable")
@ -747,7 +741,7 @@ ProcRecord bucket_fill_proc =
PDB_INTERNAL,
/* Input arguments */
9,
8,
bucket_fill_args,
/* Output arguments */
@ -781,25 +775,20 @@ bucket_fill_invoker (args)
opacity = 100.0;
threshold = 0.0;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* fill mode */
if (success)
{
int_value = args[2].value.pdb_int;
int_value = args[1].value.pdb_int;
switch (int_value)
{
case 0: fill_mode = FgColorFill; break;
@ -811,7 +800,7 @@ bucket_fill_invoker (args)
/* paint mode */
if (success)
{
int_value = args[3].value.pdb_int;
int_value = args[2].value.pdb_int;
if (int_value >= NORMAL_MODE && int_value <= VALUE_MODE)
paint_mode = int_value;
else
@ -820,7 +809,7 @@ bucket_fill_invoker (args)
/* opacity */
if (success)
{
fp_value = args[4].value.pdb_float;
fp_value = args[3].value.pdb_float;
if (fp_value >= 0.0 && fp_value <= 100.0)
opacity = fp_value;
else
@ -829,7 +818,7 @@ bucket_fill_invoker (args)
/* threshold */
if (success)
{
fp_value = args[5].value.pdb_float;
fp_value = args[4].value.pdb_float;
if (fp_value >= 0.0 && fp_value <= 255.0)
threshold = fp_value;
else
@ -838,7 +827,7 @@ bucket_fill_invoker (args)
/* sample_merged */
if (success)
{
int_value = args[6].value.pdb_int;
int_value = args[5].value.pdb_int;
sample_merged = (int_value) ? TRUE : FALSE;
}
/* x, y */

View File

@ -971,10 +971,6 @@ by_color_select_preview_button_press (ByColorDialog *bcd,
/* The by_color_select procedure definition */
ProcArg by_color_select_args[] =
{
{ PDB_IMAGE,
"image",
N_("the image")
},
{ PDB_DRAWABLE,
"drawable",
N_("the drawable")
@ -1020,7 +1016,7 @@ ProcRecord by_color_select_proc =
PDB_INTERNAL,
/* Input arguments */
9,
8,
by_color_select_args,
/* Output arguments */
@ -1051,20 +1047,15 @@ by_color_select_invoker (Argument *args)
op = REPLACE;
threshold = 0;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
success = FALSE;
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* color */
if (success)
@ -1072,14 +1063,14 @@ by_color_select_invoker (Argument *args)
int i;
unsigned char *color_array;
color_array = (unsigned char *) args[2].value.pdb_pointer;
color_array = (unsigned char *) args[1].value.pdb_pointer;
for (i = 0; i < 3; i++)
color[i] = color_array[i];
}
/* threshold */
if (success)
{
int_value = args[3].value.pdb_int;
int_value = args[2].value.pdb_int;
if (int_value >= 0 && int_value <= 255)
threshold = int_value;
else
@ -1088,7 +1079,7 @@ by_color_select_invoker (Argument *args)
/* operation */
if (success)
{
int_value = args[4].value.pdb_int;
int_value = args[3].value.pdb_int;
switch (int_value)
{
case 0: op = ADD; break;
@ -1101,24 +1092,24 @@ by_color_select_invoker (Argument *args)
/* antialiasing? */
if (success)
{
int_value = args[5].value.pdb_int;
int_value = args[4].value.pdb_int;
antialias = (int_value) ? TRUE : FALSE;
}
/* feathering */
if (success)
{
int_value = args[6].value.pdb_int;
int_value = args[5].value.pdb_int;
feather = (int_value) ? TRUE : FALSE;
}
/* feather radius */
if (success)
{
feather_radius = args[7].value.pdb_float;
feather_radius = args[6].value.pdb_float;
}
/* sample merged */
if (success)
{
int_value = args[8].value.pdb_int;
int_value = args[7].value.pdb_int;
sample_merged = (int_value) ? TRUE : FALSE;
}

View File

@ -547,10 +547,6 @@ clone_non_gui_paint_func (PaintCore *paint_core,
/* The clone procedure definition */
ProcArg clone_args[] =
{
{ PDB_IMAGE,
"image",
N_("the image")
},
{ PDB_DRAWABLE,
"drawable",
N_("the drawable")
@ -593,7 +589,7 @@ ProcRecord clone_proc =
PDB_INTERNAL,
/* Input arguments */
8,
7,
clone_args,
/* Output arguments */
@ -621,25 +617,20 @@ clone_invoker (Argument *args)
drawable = NULL;
num_strokes = 0;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
success = FALSE;
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* the src drawable */
if (success)
{
int_value = args[2].value.pdb_int;
int_value = args[1].value.pdb_int;
src_drawable = drawable_get_ID (int_value);
if (src_drawable == NULL || gimage != drawable_gimage (src_drawable))
success = FALSE;
@ -649,7 +640,7 @@ clone_invoker (Argument *args)
/* the clone type */
if (success)
{
int_value = args[3].value.pdb_int;
int_value = args[2].value.pdb_int;
switch (int_value)
{
case 0: non_gui_type = ImageClone; break;
@ -660,13 +651,13 @@ clone_invoker (Argument *args)
/* x, y offsets */
if (success)
{
src_x = args[4].value.pdb_float;
src_y = args[5].value.pdb_float;
src_x = args[3].value.pdb_float;
src_y = args[4].value.pdb_float;
}
/* num strokes */
if (success)
{
int_value = args[6].value.pdb_int;
int_value = args[5].value.pdb_int;
if (int_value > 0)
num_strokes = int_value / 2;
else
@ -675,7 +666,7 @@ clone_invoker (Argument *args)
/* point array */
if (success)
stroke_array = (double *) args[7].value.pdb_pointer;
stroke_array = (double *) args[6].value.pdb_pointer;
if (success)
/* init the paint core */

View File

@ -877,10 +877,6 @@ color_balance_yb_text_update (GtkWidget *w,
/* The color_balance procedure definition */
ProcArg color_balance_args[] =
{
{ PDB_IMAGE,
"image",
N_("the image")
},
{ PDB_DRAWABLE,
"drawable",
N_("the drawable")
@ -918,7 +914,7 @@ ProcRecord color_balance_proc =
PDB_INTERNAL,
/* Input arguments */
7,
6,
color_balance_args,
/* Output arguments */
@ -955,20 +951,15 @@ color_balance_invoker (Argument *args)
magenta_green = 0;
yellow_blue = 0;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
success = FALSE;
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* make sure the drawable is not indexed color */
if (success)
@ -977,7 +968,7 @@ color_balance_invoker (Argument *args)
/* transfer_mode */
if (success)
{
int_value = args[2].value.pdb_int;
int_value = args[1].value.pdb_int;
switch (int_value)
{
case 0: transfer_mode = SHADOWS; break;
@ -989,13 +980,13 @@ color_balance_invoker (Argument *args)
/* preserve_lum */
if (success)
{
int_value = args[3].value.pdb_int;
int_value = args[2].value.pdb_int;
preserve_lum = (int_value) ? TRUE : FALSE;
}
/* cyan_red */
if (success)
{
fp_value = args[4].value.pdb_float;
fp_value = args[3].value.pdb_float;
if (fp_value >= -100 && fp_value <= 100)
cyan_red = fp_value;
else
@ -1004,7 +995,7 @@ color_balance_invoker (Argument *args)
/* magenta_green */
if (success)
{
fp_value = args[5].value.pdb_float;
fp_value = args[4].value.pdb_float;
if (fp_value >= -100 && fp_value <= 100)
magenta_green = fp_value;
else
@ -1013,7 +1004,7 @@ color_balance_invoker (Argument *args)
/* yellow_blue */
if (success)
{
fp_value = args[6].value.pdb_float;
fp_value = args[5].value.pdb_float;
if (fp_value >= -100 && fp_value <= 100)
yellow_blue = fp_value;
else

View File

@ -424,10 +424,6 @@ convolve_non_gui_paint_func (PaintCore *paint_core,
/* The convolve procedure definition */
ProcArg convolve_args[] =
{
{ PDB_IMAGE,
"image",
N_("the image")
},
{ PDB_DRAWABLE,
"drawable",
N_("the drawable")
@ -462,7 +458,7 @@ ProcRecord convolve_proc =
PDB_INTERNAL,
/* Input arguments */
6,
5,
convolve_args,
/* Output arguments */
@ -493,25 +489,20 @@ convolve_invoker (Argument *args)
type = Blur;
num_strokes = 0;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
success = FALSE;
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* the pressure */
if (success)
{
fp_value = args[2].value.pdb_int;
fp_value = args[1].value.pdb_int;
if (fp_value >= 0.0 && fp_value <= 100.0)
pressure = fp_value;
else
@ -520,7 +511,7 @@ convolve_invoker (Argument *args)
/* the convolve type */
if (success)
{
int_value = args[3].value.pdb_int;
int_value = args[2].value.pdb_int;
switch (int_value)
{
case 0: type = Blur; break;
@ -532,7 +523,7 @@ convolve_invoker (Argument *args)
/* num strokes */
if (success)
{
int_value = args[4].value.pdb_int;
int_value = args[3].value.pdb_int;
if (int_value > 0)
num_strokes = int_value / 2;
else
@ -541,7 +532,7 @@ convolve_invoker (Argument *args)
/* point array */
if (success)
stroke_array = (double *) args[5].value.pdb_pointer;
stroke_array = (double *) args[4].value.pdb_pointer;
if (success)
/* init the paint core */

View File

@ -1298,10 +1298,6 @@ curves_CR_compose (CRMatrix a,
/* Procedure for defining the curve with a spline */
ProcArg curves_spline_args[] =
{
{ PDB_IMAGE,
"image",
N_("the image")
},
{ PDB_DRAWABLE,
"drawable",
N_("the drawable")
@ -1331,7 +1327,7 @@ ProcRecord curves_spline_proc =
PDB_INTERNAL,
/* Input arguments */
5,
4,
curves_spline_args,
/* Output arguments */
@ -1359,20 +1355,15 @@ curves_spline_invoker (Argument *args)
void *pr;
GimpDrawable *drawable;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
success = FALSE;
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* make sure the drawable is not indexed color */
if (success)
@ -1382,7 +1373,7 @@ curves_spline_invoker (Argument *args)
/* channel */
if (success)
{
int_value = args[2].value.pdb_int;
int_value = args[1].value.pdb_int;
if (success)
{
if (drawable_gray (drawable))
@ -1402,14 +1393,14 @@ curves_spline_invoker (Argument *args)
}
if (success)
{
num_cp = args[3].value.pdb_int;
num_cp = args[2].value.pdb_int;
if (num_cp < 4 || num_cp > 32 || (num_cp & 0x1))
success = FALSE;
}
/* control points */
if (success)
{
control_pts = (unsigned char *) args[4].value.pdb_pointer;
control_pts = (unsigned char *) args[3].value.pdb_pointer;
}
/* arrange to modify the curves */
@ -1456,10 +1447,6 @@ curves_spline_invoker (Argument *args)
/* Procedure for explicitly defining the curve */
ProcArg curves_explicit_args[] =
{
{ PDB_IMAGE,
"image",
N_("the image")
},
{ PDB_DRAWABLE,
"drawable",
N_("the drawable")
@ -1489,7 +1476,7 @@ ProcRecord curves_explicit_proc =
PDB_INTERNAL,
/* Input arguments */
5,
4,
curves_explicit_args,
/* Output arguments */
@ -1516,20 +1503,15 @@ curves_explicit_invoker (Argument *args)
void *pr;
GimpDrawable *drawable;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
success = FALSE;
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* make sure the drawable is not indexed color */
if (success)
@ -1538,7 +1520,7 @@ curves_explicit_invoker (Argument *args)
/* channel */
if (success)
{
int_value = args[2].value.pdb_int;
int_value = args[1].value.pdb_int;
if (success)
{
if (drawable_gray (drawable))
@ -1559,14 +1541,14 @@ curves_explicit_invoker (Argument *args)
/* the number of bytes */
if (success)
{
int_value = args[3].value.pdb_int;
int_value = args[2].value.pdb_int;
if (int_value != 256)
success = FALSE;
}
/* the curve */
if (success)
{
curve = (unsigned char *) args[4].value.pdb_pointer;
curve = (unsigned char *) args[3].value.pdb_pointer;
}
/* arrange to modify the curves */

View File

@ -202,10 +202,6 @@ eraser_non_gui_paint_func (PaintCore *paint_core, GimpDrawable *drawable, int st
/* The eraser procedure definition */
ProcArg eraser_extended_args[] =
{
{ PDB_IMAGE,
"image",
N_("the image")
},
{ PDB_DRAWABLE,
"drawable",
N_("the drawable")
@ -230,10 +226,6 @@ ProcArg eraser_extended_args[] =
ProcArg eraser_args[] =
{
{ PDB_IMAGE,
"image",
N_("the image")
},
{ PDB_DRAWABLE,
"drawable",
N_("the drawable")
@ -260,7 +252,7 @@ ProcRecord eraser_proc =
PDB_INTERNAL,
/* Input arguments */
4,
3,
eraser_args,
/* Output arguments */
@ -282,7 +274,7 @@ ProcRecord eraser_extended_proc =
PDB_INTERNAL,
/* Input arguments */
6,
5,
eraser_extended_args,
/* Output arguments */
@ -308,25 +300,20 @@ eraser_invoker (args)
drawable = NULL;
num_strokes = 0;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
success = FALSE;
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* num strokes */
if (success)
{
int_value = args[2].value.pdb_int;
int_value = args[1].value.pdb_int;
if (int_value > 0)
num_strokes = int_value / 2;
else
@ -335,7 +322,7 @@ eraser_invoker (args)
/* point array */
if (success)
stroke_array = (double *) args[3].value.pdb_pointer;
stroke_array = (double *) args[2].value.pdb_pointer;
if (success)
/* init the paint core */
@ -390,25 +377,20 @@ eraser_extended_invoker (args)
drawable = NULL;
num_strokes = 0;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
success = FALSE;
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* num strokes */
if (success)
{
int_value = args[2].value.pdb_int;
int_value = args[1].value.pdb_int;
if (int_value > 0)
num_strokes = int_value / 2;
else
@ -417,7 +399,7 @@ eraser_extended_invoker (args)
/* point array */
if (success)
stroke_array = (double *) args[3].value.pdb_pointer;
stroke_array = (double *) args[2].value.pdb_pointer;
if (success)
/* init the paint core */
@ -426,8 +408,8 @@ eraser_extended_invoker (args)
if (success)
{
non_gui_hard = args[4].value.pdb_int;
non_gui_incremental = args[5].value.pdb_int;
non_gui_hard = args[3].value.pdb_int;
non_gui_incremental = args[4].value.pdb_int;
}
if (success)

View File

@ -332,10 +332,6 @@ flip_change_type (int new_type)
/* The flip procedure definition */
ProcArg flip_args[] =
{
{ PDB_IMAGE,
"image",
N_("the image")
},
{ PDB_DRAWABLE,
"drawable",
N_("the affected drawable")
@ -365,7 +361,7 @@ ProcRecord flip_proc =
PDB_INTERNAL,
/* Input arguments */
3,
2,
flip_args,
/* Output arguments */
@ -395,25 +391,20 @@ flip_invoker (Argument *args)
new_tiles = NULL;
layer = NULL;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
success = FALSE;
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* flip type */
if (success)
{
int_value = args[2].value.pdb_int;
int_value = args[1].value.pdb_int;
switch (int_value)
{
case 0: flip_type = 0; break;

View File

@ -579,10 +579,6 @@ tools_free_fuzzy_select (Tool *tool)
/* The fuzzy_select procedure definition */
ProcArg fuzzy_select_args[] =
{
{ PDB_IMAGE,
"image",
"the image"
},
{ PDB_DRAWABLE,
"drawable",
"the drawable"
@ -632,7 +628,7 @@ ProcRecord fuzzy_select_proc =
PDB_INTERNAL,
/* Input arguments */
10,
9,
fuzzy_select_args,
/* Output arguments */
@ -663,31 +659,26 @@ fuzzy_select_invoker (Argument *args)
op = REPLACE;
threshold = 0;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
success = FALSE;
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* x, y */
if (success)
{
x = args[2].value.pdb_float;
y = args[3].value.pdb_float;
x = args[1].value.pdb_float;
y = args[2].value.pdb_float;
}
/* threshold */
if (success)
{
int_value = args[4].value.pdb_int;
int_value = args[3].value.pdb_int;
if (int_value >= 0 && int_value <= 255)
threshold = int_value;
else
@ -696,7 +687,7 @@ fuzzy_select_invoker (Argument *args)
/* operation */
if (success)
{
int_value = args[5].value.pdb_int;
int_value = args[4].value.pdb_int;
switch (int_value)
{
case 0: op = ADD; break;
@ -709,24 +700,24 @@ fuzzy_select_invoker (Argument *args)
/* antialiasing? */
if (success)
{
int_value = args[6].value.pdb_int;
int_value = args[5].value.pdb_int;
antialias = (int_value) ? TRUE : FALSE;
}
/* feathering */
if (success)
{
int_value = args[7].value.pdb_int;
int_value = args[6].value.pdb_int;
feather = (int_value) ? TRUE : FALSE;
}
/* feather radius */
if (success)
{
feather_radius = args[8].value.pdb_float;
feather_radius = args[7].value.pdb_float;
}
/* sample merged */
if (success)
{
int_value = args[9].value.pdb_int;
int_value = args[8].value.pdb_int;
sample_merged = (int_value) ? TRUE : FALSE;
}

View File

@ -613,10 +613,6 @@ histogram_tool_blue_callback (GtkWidget *w,
/* The histogram procedure definition */
ProcArg histogram_args[] =
{
{ PDB_IMAGE,
"image",
"the image"
},
{ PDB_DRAWABLE,
"drawable",
"the drawable"
@ -674,7 +670,7 @@ ProcRecord histogram_proc =
PDB_INTERNAL,
/* Input arguments */
5,
4,
histogram_args,
/* Output arguments */
@ -709,25 +705,20 @@ histogram_invoker (Argument *args)
low_range = 0;
high_range = 0;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
success = FALSE;
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* channel */
if (success)
{
int_value = args[2].value.pdb_int;
int_value = args[1].value.pdb_int;
if (success)
{
if (drawable_gray (drawable))
@ -748,7 +739,7 @@ histogram_invoker (Argument *args)
/* low range */
if (success)
{
int_value = args[3].value.pdb_int;
int_value = args[2].value.pdb_int;
if (int_value >= 0 && int_value < 256)
low_range = int_value;
else
@ -757,7 +748,7 @@ histogram_invoker (Argument *args)
/* high range */
if (success)
{
int_value = args[4].value.pdb_int;
int_value = args[3].value.pdb_int;
if (int_value >= 0 && int_value < 256)
high_range = int_value;
else

View File

@ -1027,10 +1027,6 @@ hue_saturation_hue_partition_events (GtkWidget *widget,
/* The hue_saturation procedure definition */
ProcArg hue_saturation_args[] =
{
{ PDB_IMAGE,
"image",
"the image"
},
{ PDB_DRAWABLE,
"drawable",
"the drawable"
@ -1064,7 +1060,7 @@ ProcRecord hue_saturation_proc =
PDB_INTERNAL,
/* Input arguments */
6,
5,
hue_saturation_args,
/* Output arguments */
@ -1100,20 +1096,15 @@ hue_saturation_invoker (Argument *args)
lightness = 0.0;
saturation = 0.0;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
success = FALSE;
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* make sure the drawable is not indexed color */
if (success)
@ -1122,7 +1113,7 @@ hue_saturation_invoker (Argument *args)
/* hue_range */
if (success)
{
int_value = args[2].value.pdb_int;
int_value = args[1].value.pdb_int;
if (int_value < 0 || int_value > 6)
success = FALSE;
else
@ -1131,7 +1122,7 @@ hue_saturation_invoker (Argument *args)
/* hue_offset */
if (success)
{
fp_value = args[3].value.pdb_float;
fp_value = args[2].value.pdb_float;
if (fp_value < -180 || fp_value > 180)
success = FALSE;
else
@ -1140,7 +1131,7 @@ hue_saturation_invoker (Argument *args)
/* lightness */
if (success)
{
fp_value = args[4].value.pdb_float;
fp_value = args[3].value.pdb_float;
if (fp_value < -100 || fp_value > 100)
success = FALSE;
else
@ -1149,7 +1140,7 @@ hue_saturation_invoker (Argument *args)
/* saturation */
if (success)
{
fp_value = args[5].value.pdb_float;
fp_value = args[4].value.pdb_float;
if (fp_value < -100 || fp_value > 100)
success = FALSE;
else

View File

@ -1440,10 +1440,6 @@ levels_output_da_events (GtkWidget *widget,
/* The levels procedure definition */
ProcArg levels_args[] =
{
{ PDB_IMAGE,
"image",
"the image"
},
{ PDB_DRAWABLE,
"drawable",
"the drawable"
@ -1485,7 +1481,7 @@ ProcRecord levels_proc =
PDB_INTERNAL,
/* Input arguments */
8,
7,
levels_args,
/* Output arguments */
@ -1524,20 +1520,15 @@ levels_invoker (Argument *args)
low_output = 0;
high_output = 0;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
success = FALSE;
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* make sure the drawable is not indexed color */
if (success)
@ -1546,7 +1537,7 @@ levels_invoker (Argument *args)
/* channel */
if (success)
{
int_value = args[2].value.pdb_int;
int_value = args[1].value.pdb_int;
if (success)
{
if (drawable_gray (drawable))
@ -1567,7 +1558,7 @@ levels_invoker (Argument *args)
/* low input */
if (success)
{
int_value = args[3].value.pdb_int;
int_value = args[2].value.pdb_int;
if (int_value >= 0 && int_value < 256)
low_input = int_value;
else
@ -1576,7 +1567,7 @@ levels_invoker (Argument *args)
/* high input */
if (success)
{
int_value = args[4].value.pdb_int;
int_value = args[3].value.pdb_int;
if (int_value >= 0 && int_value < 256)
high_input = int_value;
else
@ -1585,7 +1576,7 @@ levels_invoker (Argument *args)
/* gamma */
if (success)
{
fp_value = args[5].value.pdb_float;
fp_value = args[4].value.pdb_float;
if (fp_value >= 0.1 && fp_value <= 10.0)
gamma = fp_value;
else
@ -1594,7 +1585,7 @@ levels_invoker (Argument *args)
/* low output */
if (success)
{
int_value = args[6].value.pdb_int;
int_value = args[5].value.pdb_int;
if (int_value >= 0 && int_value < 256)
low_output = int_value;
else
@ -1603,7 +1594,7 @@ levels_invoker (Argument *args)
/* high output */
if (success)
{
int_value = args[7].value.pdb_int;
int_value = args[6].value.pdb_int;
if (int_value >= 0 && int_value < 256)
high_output = int_value;
else

View File

@ -131,10 +131,6 @@ pencil_non_gui_paint_func (PaintCore *paint_core, GimpDrawable *drawable, int st
/* The pencil procedure definition */
ProcArg pencil_args[] =
{
{ PDB_IMAGE,
"image",
"the image"
},
{ PDB_DRAWABLE,
"drawable",
"the drawable"
@ -161,7 +157,7 @@ ProcRecord pencil_proc =
PDB_INTERNAL,
/* Input arguments */
4,
3,
pencil_args,
/* Output arguments */
@ -187,25 +183,20 @@ pencil_invoker (args)
drawable = NULL;
num_strokes = 0;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
success = FALSE;
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* num strokes */
if (success)
{
int_value = args[2].value.pdb_int;
int_value = args[1].value.pdb_int;
if (int_value > 0)
num_strokes = int_value / 2;
else
@ -214,7 +205,7 @@ pencil_invoker (args)
/* point array */
if (success)
stroke_array = (double *) args[3].value.pdb_pointer;
stroke_array = (double *) args[2].value.pdb_pointer;
if (success)
/* init the paint core */

View File

@ -321,10 +321,6 @@ perspective_tool_perspective (gimage, drawable, float_tiles, interpolation, matr
/* The perspective procedure definition */
ProcArg perspective_args[] =
{
{ PDB_IMAGE,
"image",
"the image"
},
{ PDB_DRAWABLE,
"drawable",
"the affected drawable"
@ -386,7 +382,7 @@ ProcRecord perspective_proc =
PDB_INTERNAL,
/* Input arguments */
11,
10,
perspective_args,
/* Output arguments */
@ -418,38 +414,33 @@ perspective_invoker (args)
drawable = NULL;
layer = NULL;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
success = FALSE;
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* interpolation */
if (success)
{
int_value = args[2].value.pdb_int;
int_value = args[1].value.pdb_int;
interpolation = (int_value) ? TRUE : FALSE;
}
/* perspective extents */
if (success)
{
trans_info[X0] = args[3].value.pdb_float;
trans_info[Y0] = args[4].value.pdb_float;
trans_info[X1] = args[5].value.pdb_float;
trans_info[Y1] = args[6].value.pdb_float;
trans_info[X2] = args[7].value.pdb_float;
trans_info[Y2] = args[8].value.pdb_float;
trans_info[X3] = args[9].value.pdb_float;
trans_info[Y3] = args[10].value.pdb_float;
trans_info[X0] = args[2].value.pdb_float;
trans_info[Y0] = args[3].value.pdb_float;
trans_info[X1] = args[4].value.pdb_float;
trans_info[Y1] = args[5].value.pdb_float;
trans_info[X2] = args[6].value.pdb_float;
trans_info[Y2] = args[7].value.pdb_float;
trans_info[X3] = args[8].value.pdb_float;
trans_info[Y3] = args[9].value.pdb_float;
}
/* call the perspective procedure */

View File

@ -452,10 +452,6 @@ posterize_levels_text_update (GtkWidget *w,
/* The posterize procedure definition */
ProcArg posterize_args[] =
{
{ PDB_IMAGE,
"image",
"the image"
},
{ PDB_DRAWABLE,
"drawable",
"the drawable"
@ -477,7 +473,7 @@ ProcRecord posterize_proc =
PDB_INTERNAL,
/* Input arguments */
3,
2,
posterize_args,
/* Output arguments */
@ -505,20 +501,15 @@ posterize_invoker (Argument *args)
drawable = NULL;
levels = 0;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
success = FALSE;
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* make sure the drawable is not indexed color */
if (success)
@ -527,7 +518,7 @@ posterize_invoker (Argument *args)
/* levels */
if (success)
{
int_value = args[2].value.pdb_int;
int_value = args[1].value.pdb_int;
if (int_value >= 2 && int_value < 256)
levels = int_value;
else

View File

@ -579,10 +579,6 @@ tools_free_fuzzy_select (Tool *tool)
/* The fuzzy_select procedure definition */
ProcArg fuzzy_select_args[] =
{
{ PDB_IMAGE,
"image",
"the image"
},
{ PDB_DRAWABLE,
"drawable",
"the drawable"
@ -632,7 +628,7 @@ ProcRecord fuzzy_select_proc =
PDB_INTERNAL,
/* Input arguments */
10,
9,
fuzzy_select_args,
/* Output arguments */
@ -663,31 +659,26 @@ fuzzy_select_invoker (Argument *args)
op = REPLACE;
threshold = 0;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
success = FALSE;
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* x, y */
if (success)
{
x = args[2].value.pdb_float;
y = args[3].value.pdb_float;
x = args[1].value.pdb_float;
y = args[2].value.pdb_float;
}
/* threshold */
if (success)
{
int_value = args[4].value.pdb_int;
int_value = args[3].value.pdb_int;
if (int_value >= 0 && int_value <= 255)
threshold = int_value;
else
@ -696,7 +687,7 @@ fuzzy_select_invoker (Argument *args)
/* operation */
if (success)
{
int_value = args[5].value.pdb_int;
int_value = args[4].value.pdb_int;
switch (int_value)
{
case 0: op = ADD; break;
@ -709,24 +700,24 @@ fuzzy_select_invoker (Argument *args)
/* antialiasing? */
if (success)
{
int_value = args[6].value.pdb_int;
int_value = args[5].value.pdb_int;
antialias = (int_value) ? TRUE : FALSE;
}
/* feathering */
if (success)
{
int_value = args[7].value.pdb_int;
int_value = args[6].value.pdb_int;
feather = (int_value) ? TRUE : FALSE;
}
/* feather radius */
if (success)
{
feather_radius = args[8].value.pdb_float;
feather_radius = args[7].value.pdb_float;
}
/* sample merged */
if (success)
{
int_value = args[9].value.pdb_int;
int_value = args[8].value.pdb_int;
sample_merged = (int_value) ? TRUE : FALSE;
}

View File

@ -376,10 +376,6 @@ rotate_tool_rotate (gimage, drawable, angle, float_tiles, interpolation, matrix)
/* The rotate procedure definition */
ProcArg rotate_args[] =
{
{ PDB_IMAGE,
"image",
N_("the image")
},
{ PDB_DRAWABLE,
"drawable",
N_("the affected drawable")
@ -413,7 +409,7 @@ ProcRecord rotate_proc =
PDB_INTERNAL,
/* Input arguments */
4,
3,
rotate_args,
/* Output arguments */
@ -445,30 +441,25 @@ rotate_invoker (args)
drawable = NULL;
layer = NULL;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
success = FALSE;
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* interpolation */
if (success)
{
int_value = args[2].value.pdb_int;
int_value = args[1].value.pdb_int;
interpolation = (int_value) ? TRUE : FALSE;
}
/* angle of rotation */
if (success)
angle = args[3].value.pdb_float;
angle = args[2].value.pdb_float;
/* call the rotate procedure */
if (success)

View File

@ -438,10 +438,6 @@ scale_tool_scale (gimage, drawable, trans_info, float_tiles, interpolation, matr
/* The scale procedure definition */
ProcArg scale_args[] =
{
{ PDB_IMAGE,
"image",
N_("the image")
},
{ PDB_DRAWABLE,
"drawable",
N_("the affected drawable")
@ -487,7 +483,7 @@ ProcRecord scale_proc =
PDB_INTERNAL,
/* Input arguments */
7,
6,
scale_args,
/* Output arguments */
@ -519,34 +515,29 @@ scale_invoker (args)
drawable = NULL;
layer = NULL;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
success = FALSE;
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* interpolation */
if (success)
{
int_value = args[2].value.pdb_int;
int_value = args[1].value.pdb_int;
interpolation = (int_value) ? TRUE : FALSE;
}
/* scale extents */
if (success)
{
trans_info[X1] = args[3].value.pdb_float;
trans_info[Y1] = args[4].value.pdb_float;
trans_info[X2] = args[5].value.pdb_float;
trans_info[Y2] = args[6].value.pdb_float;
trans_info[X1] = args[2].value.pdb_float;
trans_info[Y1] = args[3].value.pdb_float;
trans_info[X2] = args[4].value.pdb_float;
trans_info[Y2] = args[5].value.pdb_float;
if (trans_info[X1] >= trans_info[X2] ||
trans_info[Y1] >= trans_info[Y2])

View File

@ -363,10 +363,6 @@ shear_tool_shear (gimage, drawable, float_tiles, interpolation, matrix)
/* The shear procedure definition */
ProcArg shear_args[] =
{
{ PDB_IMAGE,
"image",
N_("the image")
},
{ PDB_DRAWABLE,
"drawable",
N_("the affected drawable")
@ -404,7 +400,7 @@ ProcRecord shear_proc =
PDB_INTERNAL,
/* Input arguments */
5,
4,
shear_args,
/* Output arguments */
@ -438,31 +434,26 @@ shear_invoker (args)
shear_type = HORZ;
layer = NULL;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
success = FALSE;
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* interpolation */
if (success)
{
int_value = args[2].value.pdb_int;
int_value = args[1].value.pdb_int;
interpolation = (int_value) ? TRUE : FALSE;
}
/* shear type */
if (success)
{
int_value = args[3].value.pdb_int;
int_value = args[2].value.pdb_int;
switch (int_value)
{
case 0: shear_type = HORZ; break;
@ -473,7 +464,7 @@ shear_invoker (args)
/* shear extents */
if (success)
{
shear_magnitude = args[4].value.pdb_float;
shear_magnitude = args[3].value.pdb_float;
}
/* call the shear procedure */

View File

@ -547,10 +547,6 @@ clone_non_gui_paint_func (PaintCore *paint_core,
/* The clone procedure definition */
ProcArg clone_args[] =
{
{ PDB_IMAGE,
"image",
N_("the image")
},
{ PDB_DRAWABLE,
"drawable",
N_("the drawable")
@ -593,7 +589,7 @@ ProcRecord clone_proc =
PDB_INTERNAL,
/* Input arguments */
8,
7,
clone_args,
/* Output arguments */
@ -621,25 +617,20 @@ clone_invoker (Argument *args)
drawable = NULL;
num_strokes = 0;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
success = FALSE;
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* the src drawable */
if (success)
{
int_value = args[2].value.pdb_int;
int_value = args[1].value.pdb_int;
src_drawable = drawable_get_ID (int_value);
if (src_drawable == NULL || gimage != drawable_gimage (src_drawable))
success = FALSE;
@ -649,7 +640,7 @@ clone_invoker (Argument *args)
/* the clone type */
if (success)
{
int_value = args[3].value.pdb_int;
int_value = args[2].value.pdb_int;
switch (int_value)
{
case 0: non_gui_type = ImageClone; break;
@ -660,13 +651,13 @@ clone_invoker (Argument *args)
/* x, y offsets */
if (success)
{
src_x = args[4].value.pdb_float;
src_y = args[5].value.pdb_float;
src_x = args[3].value.pdb_float;
src_y = args[4].value.pdb_float;
}
/* num strokes */
if (success)
{
int_value = args[6].value.pdb_int;
int_value = args[5].value.pdb_int;
if (int_value > 0)
num_strokes = int_value / 2;
else
@ -675,7 +666,7 @@ clone_invoker (Argument *args)
/* point array */
if (success)
stroke_array = (double *) args[7].value.pdb_pointer;
stroke_array = (double *) args[6].value.pdb_pointer;
if (success)
/* init the paint core */

View File

@ -611,10 +611,6 @@ threshold_high_threshold_text_update (GtkWidget *w,
/* The threshold procedure definition */
ProcArg threshold_args[] =
{
{ PDB_IMAGE,
"image",
N_("the image")
},
{ PDB_DRAWABLE,
"drawable",
N_("the drawable")
@ -640,7 +636,7 @@ ProcRecord threshold_proc =
PDB_INTERNAL,
/* Input arguments */
4,
3,
threshold_args,
/* Output arguments */
@ -671,20 +667,15 @@ threshold_invoker (args)
low_threshold = 0;
high_threshold = 0;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
success = FALSE;
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* make sure the drawable is not indexed color */
if (success)
@ -693,7 +684,7 @@ threshold_invoker (args)
/* low threhsold */
if (success)
{
int_value = args[2].value.pdb_int;
int_value = args[1].value.pdb_int;
if (int_value >= 0 && int_value < 256)
low_threshold = int_value;
else
@ -702,7 +693,7 @@ threshold_invoker (args)
/* high threhsold */
if (success)
{
int_value = args[3].value.pdb_int;
int_value = args[2].value.pdb_int;
if (int_value >= 0 && int_value < 256)
high_threshold = int_value;
else

View File

@ -613,10 +613,6 @@ histogram_tool_blue_callback (GtkWidget *w,
/* The histogram procedure definition */
ProcArg histogram_args[] =
{
{ PDB_IMAGE,
"image",
"the image"
},
{ PDB_DRAWABLE,
"drawable",
"the drawable"
@ -674,7 +670,7 @@ ProcRecord histogram_proc =
PDB_INTERNAL,
/* Input arguments */
5,
4,
histogram_args,
/* Output arguments */
@ -709,25 +705,20 @@ histogram_invoker (Argument *args)
low_range = 0;
high_range = 0;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
success = FALSE;
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* channel */
if (success)
{
int_value = args[2].value.pdb_int;
int_value = args[1].value.pdb_int;
if (success)
{
if (drawable_gray (drawable))
@ -748,7 +739,7 @@ histogram_invoker (Argument *args)
/* low range */
if (success)
{
int_value = args[3].value.pdb_int;
int_value = args[2].value.pdb_int;
if (int_value >= 0 && int_value < 256)
low_range = int_value;
else
@ -757,7 +748,7 @@ histogram_invoker (Argument *args)
/* high range */
if (success)
{
int_value = args[4].value.pdb_int;
int_value = args[3].value.pdb_int;
if (int_value >= 0 && int_value < 256)
high_range = int_value;
else

View File

@ -1027,10 +1027,6 @@ hue_saturation_hue_partition_events (GtkWidget *widget,
/* The hue_saturation procedure definition */
ProcArg hue_saturation_args[] =
{
{ PDB_IMAGE,
"image",
"the image"
},
{ PDB_DRAWABLE,
"drawable",
"the drawable"
@ -1064,7 +1060,7 @@ ProcRecord hue_saturation_proc =
PDB_INTERNAL,
/* Input arguments */
6,
5,
hue_saturation_args,
/* Output arguments */
@ -1100,20 +1096,15 @@ hue_saturation_invoker (Argument *args)
lightness = 0.0;
saturation = 0.0;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
success = FALSE;
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* make sure the drawable is not indexed color */
if (success)
@ -1122,7 +1113,7 @@ hue_saturation_invoker (Argument *args)
/* hue_range */
if (success)
{
int_value = args[2].value.pdb_int;
int_value = args[1].value.pdb_int;
if (int_value < 0 || int_value > 6)
success = FALSE;
else
@ -1131,7 +1122,7 @@ hue_saturation_invoker (Argument *args)
/* hue_offset */
if (success)
{
fp_value = args[3].value.pdb_float;
fp_value = args[2].value.pdb_float;
if (fp_value < -180 || fp_value > 180)
success = FALSE;
else
@ -1140,7 +1131,7 @@ hue_saturation_invoker (Argument *args)
/* lightness */
if (success)
{
fp_value = args[4].value.pdb_float;
fp_value = args[3].value.pdb_float;
if (fp_value < -100 || fp_value > 100)
success = FALSE;
else
@ -1149,7 +1140,7 @@ hue_saturation_invoker (Argument *args)
/* saturation */
if (success)
{
fp_value = args[5].value.pdb_float;
fp_value = args[4].value.pdb_float;
if (fp_value < -100 || fp_value > 100)
success = FALSE;
else

View File

@ -1440,10 +1440,6 @@ levels_output_da_events (GtkWidget *widget,
/* The levels procedure definition */
ProcArg levels_args[] =
{
{ PDB_IMAGE,
"image",
"the image"
},
{ PDB_DRAWABLE,
"drawable",
"the drawable"
@ -1485,7 +1481,7 @@ ProcRecord levels_proc =
PDB_INTERNAL,
/* Input arguments */
8,
7,
levels_args,
/* Output arguments */
@ -1524,20 +1520,15 @@ levels_invoker (Argument *args)
low_output = 0;
high_output = 0;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
success = FALSE;
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* make sure the drawable is not indexed color */
if (success)
@ -1546,7 +1537,7 @@ levels_invoker (Argument *args)
/* channel */
if (success)
{
int_value = args[2].value.pdb_int;
int_value = args[1].value.pdb_int;
if (success)
{
if (drawable_gray (drawable))
@ -1567,7 +1558,7 @@ levels_invoker (Argument *args)
/* low input */
if (success)
{
int_value = args[3].value.pdb_int;
int_value = args[2].value.pdb_int;
if (int_value >= 0 && int_value < 256)
low_input = int_value;
else
@ -1576,7 +1567,7 @@ levels_invoker (Argument *args)
/* high input */
if (success)
{
int_value = args[4].value.pdb_int;
int_value = args[3].value.pdb_int;
if (int_value >= 0 && int_value < 256)
high_input = int_value;
else
@ -1585,7 +1576,7 @@ levels_invoker (Argument *args)
/* gamma */
if (success)
{
fp_value = args[5].value.pdb_float;
fp_value = args[4].value.pdb_float;
if (fp_value >= 0.1 && fp_value <= 10.0)
gamma = fp_value;
else
@ -1594,7 +1585,7 @@ levels_invoker (Argument *args)
/* low output */
if (success)
{
int_value = args[6].value.pdb_int;
int_value = args[5].value.pdb_int;
if (int_value >= 0 && int_value < 256)
low_output = int_value;
else
@ -1603,7 +1594,7 @@ levels_invoker (Argument *args)
/* high output */
if (success)
{
int_value = args[7].value.pdb_int;
int_value = args[6].value.pdb_int;
if (int_value >= 0 && int_value < 256)
high_output = int_value;
else

View File

@ -244,10 +244,6 @@ paintbrush_non_gui_paint_func (PaintCore *paint_core,
/* The paintbrush procedure definition */
ProcArg paintbrush_args[] =
{
{ PDB_IMAGE,
"image",
"the image"
},
{ PDB_DRAWABLE,
"drawable",
"the drawable"
@ -268,10 +264,6 @@ ProcArg paintbrush_args[] =
ProcArg paintbrush_extended_args[] =
{
{ PDB_IMAGE,
"image",
"the image"
},
{ PDB_DRAWABLE,
"drawable",
"the drawable"
@ -306,7 +298,7 @@ ProcRecord paintbrush_proc =
PDB_INTERNAL,
/* Input arguments */
5,
4,
paintbrush_args,
/* Output arguments */
@ -328,7 +320,7 @@ ProcRecord paintbrush_extended_proc =
PDB_INTERNAL,
/* Input arguments */
6,
5,
paintbrush_extended_args,
/* Output arguments */
@ -354,25 +346,20 @@ paintbrush_invoker (Argument *args)
drawable = NULL;
num_strokes = 0;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
success = FALSE;
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* fade out */
if (success)
{
fp_value = args[2].value.pdb_float;
fp_value = args[1].value.pdb_float;
if (fp_value >= 0.0)
non_gui_fade_out = fp_value;
else
@ -381,7 +368,7 @@ paintbrush_invoker (Argument *args)
/* num strokes */
if (success)
{
int_value = args[3].value.pdb_int;
int_value = args[2].value.pdb_int;
if (int_value > 0)
num_strokes = int_value / 2;
else
@ -390,7 +377,7 @@ paintbrush_invoker (Argument *args)
/* point array */
if (success)
stroke_array = (double *) args[4].value.pdb_pointer;
stroke_array = (double *) args[3].value.pdb_pointer;
if (success)
/* init the paint core */
@ -444,25 +431,20 @@ paintbrush_extended_invoker (Argument *args)
drawable = NULL;
num_strokes = 0;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
success = FALSE;
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* fade out */
if (success)
{
fp_value = args[2].value.pdb_float;
fp_value = args[1].value.pdb_float;
if (fp_value >= 0.0)
non_gui_fade_out = fp_value;
else
@ -471,7 +453,7 @@ paintbrush_extended_invoker (Argument *args)
/* num strokes */
if (success)
{
int_value = args[3].value.pdb_int;
int_value = args[2].value.pdb_int;
if (int_value > 0)
num_strokes = int_value / 2;
else
@ -480,7 +462,7 @@ paintbrush_extended_invoker (Argument *args)
/* point array */
if (success)
stroke_array = (double *) args[4].value.pdb_pointer;
stroke_array = (double *) args[3].value.pdb_pointer;
if (success)
/* init the paint core */
@ -489,7 +471,7 @@ paintbrush_extended_invoker (Argument *args)
if (success)
{
non_gui_incremental = args[5].value.pdb_int;
non_gui_incremental = args[4].value.pdb_int;
/* set the paint core's paint func */
non_gui_paint_core.paint_func = paintbrush_non_gui_paint_func;

View File

@ -131,10 +131,6 @@ pencil_non_gui_paint_func (PaintCore *paint_core, GimpDrawable *drawable, int st
/* The pencil procedure definition */
ProcArg pencil_args[] =
{
{ PDB_IMAGE,
"image",
"the image"
},
{ PDB_DRAWABLE,
"drawable",
"the drawable"
@ -161,7 +157,7 @@ ProcRecord pencil_proc =
PDB_INTERNAL,
/* Input arguments */
4,
3,
pencil_args,
/* Output arguments */
@ -187,25 +183,20 @@ pencil_invoker (args)
drawable = NULL;
num_strokes = 0;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
success = FALSE;
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* num strokes */
if (success)
{
int_value = args[2].value.pdb_int;
int_value = args[1].value.pdb_int;
if (int_value > 0)
num_strokes = int_value / 2;
else
@ -214,7 +205,7 @@ pencil_invoker (args)
/* point array */
if (success)
stroke_array = (double *) args[3].value.pdb_pointer;
stroke_array = (double *) args[2].value.pdb_pointer;
if (success)
/* init the paint core */

View File

@ -321,10 +321,6 @@ perspective_tool_perspective (gimage, drawable, float_tiles, interpolation, matr
/* The perspective procedure definition */
ProcArg perspective_args[] =
{
{ PDB_IMAGE,
"image",
"the image"
},
{ PDB_DRAWABLE,
"drawable",
"the affected drawable"
@ -386,7 +382,7 @@ ProcRecord perspective_proc =
PDB_INTERNAL,
/* Input arguments */
11,
10,
perspective_args,
/* Output arguments */
@ -418,38 +414,33 @@ perspective_invoker (args)
drawable = NULL;
layer = NULL;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
success = FALSE;
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* interpolation */
if (success)
{
int_value = args[2].value.pdb_int;
int_value = args[1].value.pdb_int;
interpolation = (int_value) ? TRUE : FALSE;
}
/* perspective extents */
if (success)
{
trans_info[X0] = args[3].value.pdb_float;
trans_info[Y0] = args[4].value.pdb_float;
trans_info[X1] = args[5].value.pdb_float;
trans_info[Y1] = args[6].value.pdb_float;
trans_info[X2] = args[7].value.pdb_float;
trans_info[Y2] = args[8].value.pdb_float;
trans_info[X3] = args[9].value.pdb_float;
trans_info[Y3] = args[10].value.pdb_float;
trans_info[X0] = args[2].value.pdb_float;
trans_info[Y0] = args[3].value.pdb_float;
trans_info[X1] = args[4].value.pdb_float;
trans_info[Y1] = args[5].value.pdb_float;
trans_info[X2] = args[6].value.pdb_float;
trans_info[Y2] = args[7].value.pdb_float;
trans_info[X3] = args[8].value.pdb_float;
trans_info[Y3] = args[9].value.pdb_float;
}
/* call the perspective procedure */

View File

@ -452,10 +452,6 @@ posterize_levels_text_update (GtkWidget *w,
/* The posterize procedure definition */
ProcArg posterize_args[] =
{
{ PDB_IMAGE,
"image",
"the image"
},
{ PDB_DRAWABLE,
"drawable",
"the drawable"
@ -477,7 +473,7 @@ ProcRecord posterize_proc =
PDB_INTERNAL,
/* Input arguments */
3,
2,
posterize_args,
/* Output arguments */
@ -505,20 +501,15 @@ posterize_invoker (Argument *args)
drawable = NULL;
levels = 0;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
success = FALSE;
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* make sure the drawable is not indexed color */
if (success)
@ -527,7 +518,7 @@ posterize_invoker (Argument *args)
/* levels */
if (success)
{
int_value = args[2].value.pdb_int;
int_value = args[1].value.pdb_int;
if (int_value >= 2 && int_value < 256)
levels = int_value;
else

View File

@ -376,10 +376,6 @@ rotate_tool_rotate (gimage, drawable, angle, float_tiles, interpolation, matrix)
/* The rotate procedure definition */
ProcArg rotate_args[] =
{
{ PDB_IMAGE,
"image",
N_("the image")
},
{ PDB_DRAWABLE,
"drawable",
N_("the affected drawable")
@ -413,7 +409,7 @@ ProcRecord rotate_proc =
PDB_INTERNAL,
/* Input arguments */
4,
3,
rotate_args,
/* Output arguments */
@ -445,30 +441,25 @@ rotate_invoker (args)
drawable = NULL;
layer = NULL;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
success = FALSE;
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* interpolation */
if (success)
{
int_value = args[2].value.pdb_int;
int_value = args[1].value.pdb_int;
interpolation = (int_value) ? TRUE : FALSE;
}
/* angle of rotation */
if (success)
angle = args[3].value.pdb_float;
angle = args[2].value.pdb_float;
/* call the rotate procedure */
if (success)

View File

@ -438,10 +438,6 @@ scale_tool_scale (gimage, drawable, trans_info, float_tiles, interpolation, matr
/* The scale procedure definition */
ProcArg scale_args[] =
{
{ PDB_IMAGE,
"image",
N_("the image")
},
{ PDB_DRAWABLE,
"drawable",
N_("the affected drawable")
@ -487,7 +483,7 @@ ProcRecord scale_proc =
PDB_INTERNAL,
/* Input arguments */
7,
6,
scale_args,
/* Output arguments */
@ -519,34 +515,29 @@ scale_invoker (args)
drawable = NULL;
layer = NULL;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
success = FALSE;
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* interpolation */
if (success)
{
int_value = args[2].value.pdb_int;
int_value = args[1].value.pdb_int;
interpolation = (int_value) ? TRUE : FALSE;
}
/* scale extents */
if (success)
{
trans_info[X1] = args[3].value.pdb_float;
trans_info[Y1] = args[4].value.pdb_float;
trans_info[X2] = args[5].value.pdb_float;
trans_info[Y2] = args[6].value.pdb_float;
trans_info[X1] = args[2].value.pdb_float;
trans_info[Y1] = args[3].value.pdb_float;
trans_info[X2] = args[4].value.pdb_float;
trans_info[Y2] = args[5].value.pdb_float;
if (trans_info[X1] >= trans_info[X2] ||
trans_info[Y1] >= trans_info[Y2])

View File

@ -363,10 +363,6 @@ shear_tool_shear (gimage, drawable, float_tiles, interpolation, matrix)
/* The shear procedure definition */
ProcArg shear_args[] =
{
{ PDB_IMAGE,
"image",
N_("the image")
},
{ PDB_DRAWABLE,
"drawable",
N_("the affected drawable")
@ -404,7 +400,7 @@ ProcRecord shear_proc =
PDB_INTERNAL,
/* Input arguments */
5,
4,
shear_args,
/* Output arguments */
@ -438,31 +434,26 @@ shear_invoker (args)
shear_type = HORZ;
layer = NULL;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
success = FALSE;
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* interpolation */
if (success)
{
int_value = args[2].value.pdb_int;
int_value = args[1].value.pdb_int;
interpolation = (int_value) ? TRUE : FALSE;
}
/* shear type */
if (success)
{
int_value = args[3].value.pdb_int;
int_value = args[2].value.pdb_int;
switch (int_value)
{
case 0: shear_type = HORZ; break;
@ -473,7 +464,7 @@ shear_invoker (args)
/* shear extents */
if (success)
{
shear_magnitude = args[4].value.pdb_float;
shear_magnitude = args[3].value.pdb_float;
}
/* call the shear procedure */

View File

@ -611,10 +611,6 @@ threshold_high_threshold_text_update (GtkWidget *w,
/* The threshold procedure definition */
ProcArg threshold_args[] =
{
{ PDB_IMAGE,
"image",
N_("the image")
},
{ PDB_DRAWABLE,
"drawable",
N_("the drawable")
@ -640,7 +636,7 @@ ProcRecord threshold_proc =
PDB_INTERNAL,
/* Input arguments */
4,
3,
threshold_args,
/* Output arguments */
@ -671,20 +667,15 @@ threshold_invoker (args)
low_threshold = 0;
high_threshold = 0;
/* the gimage */
if (success)
{
int_value = args[0].value.pdb_int;
if (! (gimage = gimage_get_ID (int_value)))
success = FALSE;
}
/* the drawable */
if (success)
{
int_value = args[1].value.pdb_int;
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL || gimage != drawable_gimage (drawable))
success = FALSE;
if (drawable == NULL)
success = FALSE;
else
gimage = drawable_gimage (drawable);
}
/* make sure the drawable is not indexed color */
if (success)
@ -693,7 +684,7 @@ threshold_invoker (args)
/* low threhsold */
if (success)
{
int_value = args[2].value.pdb_int;
int_value = args[1].value.pdb_int;
if (int_value >= 0 && int_value < 256)
low_threshold = int_value;
else
@ -702,7 +693,7 @@ threshold_invoker (args)
/* high threhsold */
if (success)
{
int_value = args[3].value.pdb_int;
int_value = args[2].value.pdb_int;
if (int_value >= 0 && int_value < 256)
high_threshold = int_value;
else