mirror of https://github.com/GNOME/gimp.git
Sven Neumann <sven@gimp.org>
2000-08-03 Michael Natterer <mitch@gimp.org> Sven Neumann <sven@gimp.org> * libgimp/gimp.c * libgimp/gimpbrushmenu.c * libgimp/gimpprotocol.c: removed COMPAT_CRUFT * plug-ins/FractalExplorer/FractalExplorer.c * plug-ins/common/film.c * plug-ins/common/sample_colorize.c * plug-ins/gdyntext/gdyntext.c * plug-ins/gfig/gfig.c * plug-ins/print/print.c * plug-ins/sel2path/sel2path.c: replaced gimp_run_procedure calls with functions from libgimp that wrap the PDB calls. And, you guessed it, cleanup and indentation. * plug-ins/print/gimp_main_window.c: closed bug #11784.
This commit is contained in:
parent
65f8231d43
commit
3c4fc75083
|
@ -19,3 +19,4 @@ intl
|
|||
config.h.in
|
||||
stamp-h.in
|
||||
ABOUT-NLS
|
||||
.xvpics
|
||||
|
|
19
ChangeLog
19
ChangeLog
|
@ -1,3 +1,22 @@
|
|||
2000-08-03 Michael Natterer <mitch@gimp.org>
|
||||
Sven Neumann <sven@gimp.org>
|
||||
|
||||
* libgimp/gimp.c
|
||||
* libgimp/gimpbrushmenu.c
|
||||
* libgimp/gimpprotocol.c: removed COMPAT_CRUFT
|
||||
|
||||
* plug-ins/FractalExplorer/FractalExplorer.c
|
||||
* plug-ins/common/film.c
|
||||
* plug-ins/common/sample_colorize.c
|
||||
* plug-ins/gdyntext/gdyntext.c
|
||||
* plug-ins/gfig/gfig.c
|
||||
* plug-ins/print/print.c
|
||||
* plug-ins/sel2path/sel2path.c: replaced gimp_run_procedure
|
||||
calls with functions from libgimp that wrap the PDB calls.
|
||||
And, you guessed it, cleanup and indentation.
|
||||
|
||||
* plug-ins/print/gimp_main_window.c: closed bug #11784.
|
||||
|
||||
2000-08-02 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* libgimp/gimp.def: Add handful of missing functions, that
|
||||
|
|
102
libgimp/gimp.c
102
libgimp/gimp.c
|
@ -432,58 +432,58 @@ gimp_run_procedure (gchar *name,
|
|||
va_start (args, nreturn_vals);
|
||||
param_type = va_arg (args, GimpPDBArgType);
|
||||
|
||||
while (param_type != PARAM_END)
|
||||
while (param_type != GIMP_PDB_END)
|
||||
{
|
||||
switch (param_type)
|
||||
{
|
||||
case PARAM_INT32:
|
||||
case PARAM_DISPLAY:
|
||||
case PARAM_IMAGE:
|
||||
case PARAM_LAYER:
|
||||
case PARAM_CHANNEL:
|
||||
case PARAM_DRAWABLE:
|
||||
case PARAM_SELECTION:
|
||||
case PARAM_BOUNDARY:
|
||||
case PARAM_PATH:
|
||||
case PARAM_STATUS:
|
||||
case GIMP_PDB_INT32:
|
||||
case GIMP_PDB_DISPLAY:
|
||||
case GIMP_PDB_IMAGE:
|
||||
case GIMP_PDB_LAYER:
|
||||
case GIMP_PDB_CHANNEL:
|
||||
case GIMP_PDB_DRAWABLE:
|
||||
case GIMP_PDB_SELECTION:
|
||||
case GIMP_PDB_BOUNDARY:
|
||||
case GIMP_PDB_PATH:
|
||||
case GIMP_PDB_STATUS:
|
||||
(void) va_arg (args, gint);
|
||||
break;
|
||||
case PARAM_INT16:
|
||||
case GIMP_PDB_INT16:
|
||||
(void) va_arg (args, gint);
|
||||
break;
|
||||
case PARAM_INT8:
|
||||
case GIMP_PDB_INT8:
|
||||
(void) va_arg (args, gint);
|
||||
break;
|
||||
case PARAM_FLOAT:
|
||||
case GIMP_PDB_FLOAT:
|
||||
(void) va_arg (args, gdouble);
|
||||
break;
|
||||
case PARAM_STRING:
|
||||
case GIMP_PDB_STRING:
|
||||
(void) va_arg (args, gchar *);
|
||||
break;
|
||||
case PARAM_INT32ARRAY:
|
||||
case GIMP_PDB_INT32ARRAY:
|
||||
(void) va_arg (args, gint32 *);
|
||||
break;
|
||||
case PARAM_INT16ARRAY:
|
||||
case GIMP_PDB_INT16ARRAY:
|
||||
(void) va_arg (args, gint16 *);
|
||||
break;
|
||||
case PARAM_INT8ARRAY:
|
||||
case GIMP_PDB_INT8ARRAY:
|
||||
(void) va_arg (args, gint8 *);
|
||||
break;
|
||||
case PARAM_FLOATARRAY:
|
||||
case GIMP_PDB_FLOATARRAY:
|
||||
(void) va_arg (args, gdouble *);
|
||||
break;
|
||||
case PARAM_STRINGARRAY:
|
||||
case GIMP_PDB_STRINGARRAY:
|
||||
(void) va_arg (args, gchar **);
|
||||
break;
|
||||
case PARAM_COLOR:
|
||||
case GIMP_PDB_COLOR:
|
||||
(void) va_arg (args, guchar *);
|
||||
break;
|
||||
case PARAM_PARASITE:
|
||||
case GIMP_PDB_PARASITE:
|
||||
(void) va_arg (args, GimpParasite *);
|
||||
break;
|
||||
case PARAM_REGION:
|
||||
case GIMP_PDB_REGION:
|
||||
break;
|
||||
case PARAM_END:
|
||||
case GIMP_PDB_END:
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -503,69 +503,69 @@ gimp_run_procedure (gchar *name,
|
|||
|
||||
switch (proc_run.params[i].type)
|
||||
{
|
||||
case PARAM_INT32:
|
||||
case GIMP_PDB_INT32:
|
||||
proc_run.params[i].data.d_int32 = (gint32) va_arg (args, gint);
|
||||
break;
|
||||
case PARAM_INT16:
|
||||
case GIMP_PDB_INT16:
|
||||
proc_run.params[i].data.d_int16 = (gint16) va_arg (args, gint);
|
||||
break;
|
||||
case PARAM_INT8:
|
||||
case GIMP_PDB_INT8:
|
||||
proc_run.params[i].data.d_int8 = (gint8) va_arg (args, gint);
|
||||
break;
|
||||
case PARAM_FLOAT:
|
||||
case GIMP_PDB_FLOAT:
|
||||
proc_run.params[i].data.d_float = (gdouble) va_arg (args, gdouble);
|
||||
break;
|
||||
case PARAM_STRING:
|
||||
case GIMP_PDB_STRING:
|
||||
proc_run.params[i].data.d_string = va_arg (args, gchar *);
|
||||
break;
|
||||
case PARAM_INT32ARRAY:
|
||||
case GIMP_PDB_INT32ARRAY:
|
||||
proc_run.params[i].data.d_int32array = va_arg (args, gint32 *);
|
||||
break;
|
||||
case PARAM_INT16ARRAY:
|
||||
case GIMP_PDB_INT16ARRAY:
|
||||
proc_run.params[i].data.d_int16array = va_arg (args, gint16 *);
|
||||
break;
|
||||
case PARAM_INT8ARRAY:
|
||||
case GIMP_PDB_INT8ARRAY:
|
||||
proc_run.params[i].data.d_int8array = va_arg (args, gint8 *);
|
||||
break;
|
||||
case PARAM_FLOATARRAY:
|
||||
case GIMP_PDB_FLOATARRAY:
|
||||
proc_run.params[i].data.d_floatarray = va_arg (args, gdouble *);
|
||||
break;
|
||||
case PARAM_STRINGARRAY:
|
||||
case GIMP_PDB_STRINGARRAY:
|
||||
proc_run.params[i].data.d_stringarray = va_arg (args, gchar **);
|
||||
break;
|
||||
case PARAM_COLOR:
|
||||
case GIMP_PDB_COLOR:
|
||||
color = va_arg (args, guchar *);
|
||||
proc_run.params[i].data.d_color.red = color[0];
|
||||
proc_run.params[i].data.d_color.green = color[1];
|
||||
proc_run.params[i].data.d_color.blue = color[2];
|
||||
break;
|
||||
case PARAM_REGION:
|
||||
case GIMP_PDB_REGION:
|
||||
break;
|
||||
case PARAM_DISPLAY:
|
||||
case GIMP_PDB_DISPLAY:
|
||||
proc_run.params[i].data.d_display = va_arg (args, gint32);
|
||||
break;
|
||||
case PARAM_IMAGE:
|
||||
case GIMP_PDB_IMAGE:
|
||||
proc_run.params[i].data.d_image = va_arg (args, gint32);
|
||||
break;
|
||||
case PARAM_LAYER:
|
||||
case GIMP_PDB_LAYER:
|
||||
proc_run.params[i].data.d_layer = va_arg (args, gint32);
|
||||
break;
|
||||
case PARAM_CHANNEL:
|
||||
case GIMP_PDB_CHANNEL:
|
||||
proc_run.params[i].data.d_channel = va_arg (args, gint32);
|
||||
break;
|
||||
case PARAM_DRAWABLE:
|
||||
case GIMP_PDB_DRAWABLE:
|
||||
proc_run.params[i].data.d_drawable = va_arg (args, gint32);
|
||||
break;
|
||||
case PARAM_SELECTION:
|
||||
case GIMP_PDB_SELECTION:
|
||||
proc_run.params[i].data.d_selection = va_arg (args, gint32);
|
||||
break;
|
||||
case PARAM_BOUNDARY:
|
||||
case GIMP_PDB_BOUNDARY:
|
||||
proc_run.params[i].data.d_boundary = va_arg (args, gint32);
|
||||
break;
|
||||
case PARAM_PATH:
|
||||
case GIMP_PDB_PATH:
|
||||
proc_run.params[i].data.d_path = va_arg (args, gint32);
|
||||
break;
|
||||
case PARAM_PARASITE:
|
||||
case GIMP_PDB_PARASITE:
|
||||
{
|
||||
GimpParasite *parasite = va_arg (args, GimpParasite *);
|
||||
|
||||
|
@ -583,10 +583,10 @@ gimp_run_procedure (gchar *name,
|
|||
}
|
||||
}
|
||||
break;
|
||||
case PARAM_STATUS:
|
||||
case GIMP_PDB_STATUS:
|
||||
proc_run.params[i].data.d_status = va_arg (args, gint32);
|
||||
break;
|
||||
case PARAM_END:
|
||||
case GIMP_PDB_END:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -604,10 +604,10 @@ gimp_run_procedure (gchar *name,
|
|||
|
||||
switch (return_vals[0].data.d_status)
|
||||
{
|
||||
case STATUS_EXECUTION_ERROR:
|
||||
case GIMP_PDB_EXECUTION_ERROR:
|
||||
/*g_warning ("an execution error occured while trying to run: \"%s\"", name);*/
|
||||
break;
|
||||
case STATUS_CALLING_ERROR:
|
||||
case GIMP_PDB_CALLING_ERROR:
|
||||
g_warning ("a calling error occured while trying to run: \"%s\"", name);
|
||||
break;
|
||||
default:
|
||||
|
@ -672,10 +672,10 @@ gimp_run_procedure2 (gchar *name,
|
|||
|
||||
switch (return_vals[0].data.d_status)
|
||||
{
|
||||
case STATUS_EXECUTION_ERROR:
|
||||
case GIMP_PDB_EXECUTION_ERROR:
|
||||
/*g_warning ("an execution error occured while trying to run: \"%s\"", name);*/
|
||||
break;
|
||||
case STATUS_CALLING_ERROR:
|
||||
case GIMP_PDB_CALLING_ERROR:
|
||||
g_warning ("a calling error occured while trying to run: \"%s\"", name);
|
||||
break;
|
||||
default:
|
||||
|
|
|
@ -433,7 +433,7 @@ gimp_brush_select_widget_set_popup (GtkWidget *widget,
|
|||
gint init_spacing;
|
||||
GimpLayerModeEffects init_paint_mode;
|
||||
gdouble init_opacity;
|
||||
gint *mask_data_size;
|
||||
gint mask_data_size;
|
||||
guint8 *mask_data;
|
||||
gchar *brush_name;
|
||||
BSelect *bsel;
|
||||
|
|
|
@ -1007,32 +1007,32 @@ _gp_params_read (GIOChannel *channel,
|
|||
|
||||
switch ((*params)[i].type)
|
||||
{
|
||||
case PARAM_INT32:
|
||||
case GIMP_PDB_INT32:
|
||||
if (!wire_read_int32 (channel, (guint32*) &(*params)[i].data.d_int32, 1))
|
||||
goto cleanup;
|
||||
break;
|
||||
|
||||
case PARAM_INT16:
|
||||
case GIMP_PDB_INT16:
|
||||
if (!wire_read_int16 (channel, (guint16*) &(*params)[i].data.d_int16, 1))
|
||||
goto cleanup;
|
||||
break;
|
||||
|
||||
case PARAM_INT8:
|
||||
case GIMP_PDB_INT8:
|
||||
if (!wire_read_int8 (channel, (guint8*) &(*params)[i].data.d_int8, 1))
|
||||
goto cleanup;
|
||||
break;
|
||||
|
||||
case PARAM_FLOAT:
|
||||
case GIMP_PDB_FLOAT:
|
||||
if (!wire_read_double (channel, &(*params)[i].data.d_float, 1))
|
||||
goto cleanup;
|
||||
break;
|
||||
|
||||
case PARAM_STRING:
|
||||
case GIMP_PDB_STRING:
|
||||
if (!wire_read_string (channel, &(*params)[i].data.d_string, 1))
|
||||
goto cleanup;
|
||||
break;
|
||||
|
||||
case PARAM_INT32ARRAY:
|
||||
case GIMP_PDB_INT32ARRAY:
|
||||
(*params)[i].data.d_int32array =
|
||||
g_new (gint32, (*params)[i-1].data.d_int32);
|
||||
if (!wire_read_int32 (channel, (guint32*) (*params)[i].data.d_int32array,
|
||||
|
@ -1043,7 +1043,7 @@ _gp_params_read (GIOChannel *channel,
|
|||
}
|
||||
break;
|
||||
|
||||
case PARAM_INT16ARRAY:
|
||||
case GIMP_PDB_INT16ARRAY:
|
||||
(*params)[i].data.d_int16array =
|
||||
g_new (gint16, (*params)[i-1].data.d_int32);
|
||||
if (!wire_read_int16 (channel, (guint16*) (*params)[i].data.d_int16array,
|
||||
|
@ -1054,7 +1054,7 @@ _gp_params_read (GIOChannel *channel,
|
|||
}
|
||||
break;
|
||||
|
||||
case PARAM_INT8ARRAY:
|
||||
case GIMP_PDB_INT8ARRAY:
|
||||
(*params)[i].data.d_int8array =
|
||||
g_new (gint8, (*params)[i-1].data.d_int32);
|
||||
if (!wire_read_int8 (channel, (guint8*) (*params)[i].data.d_int8array,
|
||||
|
@ -1065,7 +1065,7 @@ _gp_params_read (GIOChannel *channel,
|
|||
}
|
||||
break;
|
||||
|
||||
case PARAM_FLOATARRAY:
|
||||
case GIMP_PDB_FLOATARRAY:
|
||||
(*params)[i].data.d_floatarray =
|
||||
g_new (gdouble, (*params)[i-1].data.d_int32);
|
||||
if (!wire_read_double (channel, (*params)[i].data.d_floatarray,
|
||||
|
@ -1076,7 +1076,7 @@ _gp_params_read (GIOChannel *channel,
|
|||
}
|
||||
break;
|
||||
|
||||
case PARAM_STRINGARRAY:
|
||||
case GIMP_PDB_STRINGARRAY:
|
||||
(*params)[i].data.d_stringarray =
|
||||
g_new0 (gchar*, (*params)[i-1].data.d_int32);
|
||||
if (!wire_read_string (channel, (*params)[i].data.d_stringarray,
|
||||
|
@ -1089,7 +1089,7 @@ _gp_params_read (GIOChannel *channel,
|
|||
}
|
||||
break;
|
||||
|
||||
case PARAM_COLOR:
|
||||
case GIMP_PDB_COLOR:
|
||||
if (!wire_read_int8 (channel, (guint8*) &(*params)[i].data.d_color.red, 1))
|
||||
goto cleanup;
|
||||
if (!wire_read_int8 (channel, (guint8*) &(*params)[i].data.d_color.green, 1))
|
||||
|
@ -1098,50 +1098,50 @@ _gp_params_read (GIOChannel *channel,
|
|||
goto cleanup;
|
||||
break;
|
||||
|
||||
case PARAM_REGION:
|
||||
case GIMP_PDB_REGION:
|
||||
break;
|
||||
|
||||
case PARAM_DISPLAY:
|
||||
case GIMP_PDB_DISPLAY:
|
||||
if (!wire_read_int32 (channel, (guint32*) &(*params)[i].data.d_display, 1))
|
||||
goto cleanup;
|
||||
break;
|
||||
|
||||
case PARAM_IMAGE:
|
||||
case GIMP_PDB_IMAGE:
|
||||
if (!wire_read_int32 (channel, (guint32*) &(*params)[i].data.d_image, 1))
|
||||
goto cleanup;
|
||||
break;
|
||||
|
||||
case PARAM_LAYER:
|
||||
case GIMP_PDB_LAYER:
|
||||
if (!wire_read_int32 (channel, (guint32*) &(*params)[i].data.d_layer, 1))
|
||||
goto cleanup;
|
||||
break;
|
||||
|
||||
case PARAM_CHANNEL:
|
||||
case GIMP_PDB_CHANNEL:
|
||||
if (!wire_read_int32 (channel, (guint32*) &(*params)[i].data.d_channel, 1))
|
||||
goto cleanup;
|
||||
break;
|
||||
|
||||
case PARAM_DRAWABLE:
|
||||
case GIMP_PDB_DRAWABLE:
|
||||
if (!wire_read_int32 (channel, (guint32*) &(*params)[i].data.d_drawable, 1))
|
||||
goto cleanup;
|
||||
break;
|
||||
|
||||
case PARAM_SELECTION:
|
||||
case GIMP_PDB_SELECTION:
|
||||
if (!wire_read_int32 (channel, (guint32*) &(*params)[i].data.d_selection, 1))
|
||||
goto cleanup;
|
||||
break;
|
||||
|
||||
case PARAM_BOUNDARY:
|
||||
case GIMP_PDB_BOUNDARY:
|
||||
if (!wire_read_int32 (channel, (guint32*) &(*params)[i].data.d_boundary, 1))
|
||||
goto cleanup;
|
||||
break;
|
||||
|
||||
case PARAM_PATH:
|
||||
case GIMP_PDB_PATH:
|
||||
if (!wire_read_int32 (channel, (guint32*) &(*params)[i].data.d_path, 1))
|
||||
goto cleanup;
|
||||
break;
|
||||
|
||||
case PARAM_PARASITE:
|
||||
case GIMP_PDB_PARASITE:
|
||||
if (!wire_read_string (channel, &(*params)[i].data.d_parasite.name, 1))
|
||||
goto cleanup;
|
||||
if ((*params)[i].data.d_parasite.name == NULL)
|
||||
|
@ -1168,12 +1168,12 @@ _gp_params_read (GIOChannel *channel,
|
|||
(*params)[i].data.d_parasite.data = NULL;
|
||||
break;
|
||||
|
||||
case PARAM_STATUS:
|
||||
case GIMP_PDB_STATUS:
|
||||
if (!wire_read_int32 (channel, (guint32*) &(*params)[i].data.d_status, 1))
|
||||
goto cleanup;
|
||||
break;
|
||||
|
||||
case PARAM_END:
|
||||
case GIMP_PDB_END:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -1203,62 +1203,62 @@ _gp_params_write (GIOChannel *channel,
|
|||
|
||||
switch (params[i].type)
|
||||
{
|
||||
case PARAM_INT32:
|
||||
case GIMP_PDB_INT32:
|
||||
if (!wire_write_int32 (channel, (guint32*) ¶ms[i].data.d_int32, 1))
|
||||
return;
|
||||
break;
|
||||
|
||||
case PARAM_INT16:
|
||||
case GIMP_PDB_INT16:
|
||||
if (!wire_write_int16 (channel, (guint16*) ¶ms[i].data.d_int16, 1))
|
||||
return;
|
||||
break;
|
||||
|
||||
case PARAM_INT8:
|
||||
case GIMP_PDB_INT8:
|
||||
if (!wire_write_int8 (channel, (guint8*) ¶ms[i].data.d_int8, 1))
|
||||
return;
|
||||
break;
|
||||
|
||||
case PARAM_FLOAT:
|
||||
case GIMP_PDB_FLOAT:
|
||||
if (!wire_write_double (channel, ¶ms[i].data.d_float, 1))
|
||||
return;
|
||||
break;
|
||||
|
||||
case PARAM_STRING:
|
||||
case GIMP_PDB_STRING:
|
||||
if (!wire_write_string (channel, ¶ms[i].data.d_string, 1))
|
||||
return;
|
||||
break;
|
||||
|
||||
case PARAM_INT32ARRAY:
|
||||
case GIMP_PDB_INT32ARRAY:
|
||||
if (!wire_write_int32 (channel, (guint32*) params[i].data.d_int32array,
|
||||
params[i-1].data.d_int32))
|
||||
return;
|
||||
break;
|
||||
|
||||
case PARAM_INT16ARRAY:
|
||||
case GIMP_PDB_INT16ARRAY:
|
||||
if (!wire_write_int16 (channel, (guint16*) params[i].data.d_int16array,
|
||||
params[i-1].data.d_int32))
|
||||
return;
|
||||
break;
|
||||
|
||||
case PARAM_INT8ARRAY:
|
||||
case GIMP_PDB_INT8ARRAY:
|
||||
if (!wire_write_int8 (channel, (guint8*) params[i].data.d_int8array,
|
||||
params[i-1].data.d_int32))
|
||||
return;
|
||||
break;
|
||||
|
||||
case PARAM_FLOATARRAY:
|
||||
case GIMP_PDB_FLOATARRAY:
|
||||
if (!wire_write_double (channel, params[i].data.d_floatarray,
|
||||
params[i-1].data.d_int32))
|
||||
return;
|
||||
break;
|
||||
|
||||
case PARAM_STRINGARRAY:
|
||||
case GIMP_PDB_STRINGARRAY:
|
||||
if (!wire_write_string (channel, params[i].data.d_stringarray,
|
||||
params[i-1].data.d_int32))
|
||||
return;
|
||||
break;
|
||||
|
||||
case PARAM_COLOR:
|
||||
case GIMP_PDB_COLOR:
|
||||
if (!wire_write_int8 (channel, (guint8*) ¶ms[i].data.d_color.red, 1))
|
||||
return;
|
||||
if (!wire_write_int8 (channel, (guint8*) ¶ms[i].data.d_color.green, 1))
|
||||
|
@ -1267,50 +1267,50 @@ _gp_params_write (GIOChannel *channel,
|
|||
return;
|
||||
break;
|
||||
|
||||
case PARAM_REGION:
|
||||
case GIMP_PDB_REGION:
|
||||
break;
|
||||
|
||||
case PARAM_DISPLAY:
|
||||
case GIMP_PDB_DISPLAY:
|
||||
if (!wire_write_int32 (channel, (guint32*) ¶ms[i].data.d_display, 1))
|
||||
return;
|
||||
break;
|
||||
|
||||
case PARAM_IMAGE:
|
||||
case GIMP_PDB_IMAGE:
|
||||
if (!wire_write_int32 (channel, (guint32*) ¶ms[i].data.d_image, 1))
|
||||
return;
|
||||
break;
|
||||
|
||||
case PARAM_LAYER:
|
||||
case GIMP_PDB_LAYER:
|
||||
if (!wire_write_int32 (channel, (guint32*) ¶ms[i].data.d_layer, 1))
|
||||
return;
|
||||
break;
|
||||
|
||||
case PARAM_CHANNEL:
|
||||
case GIMP_PDB_CHANNEL:
|
||||
if (!wire_write_int32 (channel, (guint32*) ¶ms[i].data.d_channel, 1))
|
||||
return;
|
||||
break;
|
||||
|
||||
case PARAM_DRAWABLE:
|
||||
case GIMP_PDB_DRAWABLE:
|
||||
if (!wire_write_int32 (channel, (guint32*) ¶ms[i].data.d_drawable, 1))
|
||||
return;
|
||||
break;
|
||||
|
||||
case PARAM_SELECTION:
|
||||
case GIMP_PDB_SELECTION:
|
||||
if (!wire_write_int32 (channel, (guint32*) ¶ms[i].data.d_selection, 1))
|
||||
return;
|
||||
break;
|
||||
|
||||
case PARAM_BOUNDARY:
|
||||
case GIMP_PDB_BOUNDARY:
|
||||
if (!wire_write_int32 (channel, (guint32*) ¶ms[i].data.d_boundary, 1))
|
||||
return;
|
||||
break;
|
||||
|
||||
case PARAM_PATH:
|
||||
case GIMP_PDB_PATH:
|
||||
if (!wire_write_int32 (channel, (guint32*) ¶ms[i].data.d_path, 1))
|
||||
return;
|
||||
break;
|
||||
|
||||
case PARAM_PARASITE:
|
||||
case GIMP_PDB_PARASITE:
|
||||
{
|
||||
GimpParasite *p = (GimpParasite *) ¶ms[i].data.d_parasite;
|
||||
if (p->name == NULL)
|
||||
|
@ -1333,12 +1333,12 @@ _gp_params_write (GIOChannel *channel,
|
|||
}
|
||||
break;
|
||||
|
||||
case PARAM_STATUS:
|
||||
case GIMP_PDB_STATUS:
|
||||
if (!wire_write_int32 (channel, (guint32*) ¶ms[i].data.d_status, 1))
|
||||
return;
|
||||
break;
|
||||
|
||||
case PARAM_END:
|
||||
case GIMP_PDB_END:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -1355,45 +1355,45 @@ _gp_params_destroy (GPParam *params,
|
|||
{
|
||||
switch (params[i].type)
|
||||
{
|
||||
case PARAM_INT32:
|
||||
case PARAM_INT16:
|
||||
case PARAM_INT8:
|
||||
case PARAM_FLOAT:
|
||||
case PARAM_COLOR:
|
||||
case PARAM_REGION:
|
||||
case PARAM_DISPLAY:
|
||||
case PARAM_IMAGE:
|
||||
case PARAM_LAYER:
|
||||
case PARAM_CHANNEL:
|
||||
case PARAM_DRAWABLE:
|
||||
case PARAM_SELECTION:
|
||||
case PARAM_BOUNDARY:
|
||||
case PARAM_PATH:
|
||||
case PARAM_STATUS:
|
||||
case GIMP_PDB_INT32:
|
||||
case GIMP_PDB_INT16:
|
||||
case GIMP_PDB_INT8:
|
||||
case GIMP_PDB_FLOAT:
|
||||
case GIMP_PDB_COLOR:
|
||||
case GIMP_PDB_REGION:
|
||||
case GIMP_PDB_DISPLAY:
|
||||
case GIMP_PDB_IMAGE:
|
||||
case GIMP_PDB_LAYER:
|
||||
case GIMP_PDB_CHANNEL:
|
||||
case GIMP_PDB_DRAWABLE:
|
||||
case GIMP_PDB_SELECTION:
|
||||
case GIMP_PDB_BOUNDARY:
|
||||
case GIMP_PDB_PATH:
|
||||
case GIMP_PDB_STATUS:
|
||||
break;
|
||||
|
||||
case PARAM_STRING:
|
||||
case GIMP_PDB_STRING:
|
||||
g_free (params[i].data.d_string);
|
||||
break;
|
||||
|
||||
case PARAM_INT32ARRAY:
|
||||
case GIMP_PDB_INT32ARRAY:
|
||||
g_free (params[i].data.d_int32array);
|
||||
break;
|
||||
|
||||
case PARAM_INT16ARRAY:
|
||||
case GIMP_PDB_INT16ARRAY:
|
||||
g_free (params[i].data.d_int16array);
|
||||
break;
|
||||
|
||||
case PARAM_INT8ARRAY:
|
||||
case GIMP_PDB_INT8ARRAY:
|
||||
g_free (params[i].data.d_int8array);
|
||||
break;
|
||||
|
||||
case PARAM_FLOATARRAY:
|
||||
case GIMP_PDB_FLOATARRAY:
|
||||
g_free (params[i].data.d_floatarray);
|
||||
break;
|
||||
|
||||
case PARAM_STRINGARRAY:
|
||||
if ((i > 0) && (params[i-1].type == PARAM_INT32))
|
||||
case GIMP_PDB_STRINGARRAY:
|
||||
if ((i > 0) && (params[i-1].type == GIMP_PDB_INT32))
|
||||
{
|
||||
count = params[i-1].data.d_int32;
|
||||
for (j = 0; j < count; j++)
|
||||
|
@ -1402,14 +1402,14 @@ _gp_params_destroy (GPParam *params,
|
|||
}
|
||||
break;
|
||||
|
||||
case PARAM_PARASITE:
|
||||
case GIMP_PDB_PARASITE:
|
||||
if (params[i].data.d_parasite.name)
|
||||
g_free(params[i].data.d_parasite.name);
|
||||
if (params[i].data.d_parasite.data)
|
||||
g_free(params[i].data.d_parasite.data);
|
||||
break;
|
||||
|
||||
case PARAM_END:
|
||||
case GIMP_PDB_END:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1007,32 +1007,32 @@ _gp_params_read (GIOChannel *channel,
|
|||
|
||||
switch ((*params)[i].type)
|
||||
{
|
||||
case PARAM_INT32:
|
||||
case GIMP_PDB_INT32:
|
||||
if (!wire_read_int32 (channel, (guint32*) &(*params)[i].data.d_int32, 1))
|
||||
goto cleanup;
|
||||
break;
|
||||
|
||||
case PARAM_INT16:
|
||||
case GIMP_PDB_INT16:
|
||||
if (!wire_read_int16 (channel, (guint16*) &(*params)[i].data.d_int16, 1))
|
||||
goto cleanup;
|
||||
break;
|
||||
|
||||
case PARAM_INT8:
|
||||
case GIMP_PDB_INT8:
|
||||
if (!wire_read_int8 (channel, (guint8*) &(*params)[i].data.d_int8, 1))
|
||||
goto cleanup;
|
||||
break;
|
||||
|
||||
case PARAM_FLOAT:
|
||||
case GIMP_PDB_FLOAT:
|
||||
if (!wire_read_double (channel, &(*params)[i].data.d_float, 1))
|
||||
goto cleanup;
|
||||
break;
|
||||
|
||||
case PARAM_STRING:
|
||||
case GIMP_PDB_STRING:
|
||||
if (!wire_read_string (channel, &(*params)[i].data.d_string, 1))
|
||||
goto cleanup;
|
||||
break;
|
||||
|
||||
case PARAM_INT32ARRAY:
|
||||
case GIMP_PDB_INT32ARRAY:
|
||||
(*params)[i].data.d_int32array =
|
||||
g_new (gint32, (*params)[i-1].data.d_int32);
|
||||
if (!wire_read_int32 (channel, (guint32*) (*params)[i].data.d_int32array,
|
||||
|
@ -1043,7 +1043,7 @@ _gp_params_read (GIOChannel *channel,
|
|||
}
|
||||
break;
|
||||
|
||||
case PARAM_INT16ARRAY:
|
||||
case GIMP_PDB_INT16ARRAY:
|
||||
(*params)[i].data.d_int16array =
|
||||
g_new (gint16, (*params)[i-1].data.d_int32);
|
||||
if (!wire_read_int16 (channel, (guint16*) (*params)[i].data.d_int16array,
|
||||
|
@ -1054,7 +1054,7 @@ _gp_params_read (GIOChannel *channel,
|
|||
}
|
||||
break;
|
||||
|
||||
case PARAM_INT8ARRAY:
|
||||
case GIMP_PDB_INT8ARRAY:
|
||||
(*params)[i].data.d_int8array =
|
||||
g_new (gint8, (*params)[i-1].data.d_int32);
|
||||
if (!wire_read_int8 (channel, (guint8*) (*params)[i].data.d_int8array,
|
||||
|
@ -1065,7 +1065,7 @@ _gp_params_read (GIOChannel *channel,
|
|||
}
|
||||
break;
|
||||
|
||||
case PARAM_FLOATARRAY:
|
||||
case GIMP_PDB_FLOATARRAY:
|
||||
(*params)[i].data.d_floatarray =
|
||||
g_new (gdouble, (*params)[i-1].data.d_int32);
|
||||
if (!wire_read_double (channel, (*params)[i].data.d_floatarray,
|
||||
|
@ -1076,7 +1076,7 @@ _gp_params_read (GIOChannel *channel,
|
|||
}
|
||||
break;
|
||||
|
||||
case PARAM_STRINGARRAY:
|
||||
case GIMP_PDB_STRINGARRAY:
|
||||
(*params)[i].data.d_stringarray =
|
||||
g_new0 (gchar*, (*params)[i-1].data.d_int32);
|
||||
if (!wire_read_string (channel, (*params)[i].data.d_stringarray,
|
||||
|
@ -1089,7 +1089,7 @@ _gp_params_read (GIOChannel *channel,
|
|||
}
|
||||
break;
|
||||
|
||||
case PARAM_COLOR:
|
||||
case GIMP_PDB_COLOR:
|
||||
if (!wire_read_int8 (channel, (guint8*) &(*params)[i].data.d_color.red, 1))
|
||||
goto cleanup;
|
||||
if (!wire_read_int8 (channel, (guint8*) &(*params)[i].data.d_color.green, 1))
|
||||
|
@ -1098,50 +1098,50 @@ _gp_params_read (GIOChannel *channel,
|
|||
goto cleanup;
|
||||
break;
|
||||
|
||||
case PARAM_REGION:
|
||||
case GIMP_PDB_REGION:
|
||||
break;
|
||||
|
||||
case PARAM_DISPLAY:
|
||||
case GIMP_PDB_DISPLAY:
|
||||
if (!wire_read_int32 (channel, (guint32*) &(*params)[i].data.d_display, 1))
|
||||
goto cleanup;
|
||||
break;
|
||||
|
||||
case PARAM_IMAGE:
|
||||
case GIMP_PDB_IMAGE:
|
||||
if (!wire_read_int32 (channel, (guint32*) &(*params)[i].data.d_image, 1))
|
||||
goto cleanup;
|
||||
break;
|
||||
|
||||
case PARAM_LAYER:
|
||||
case GIMP_PDB_LAYER:
|
||||
if (!wire_read_int32 (channel, (guint32*) &(*params)[i].data.d_layer, 1))
|
||||
goto cleanup;
|
||||
break;
|
||||
|
||||
case PARAM_CHANNEL:
|
||||
case GIMP_PDB_CHANNEL:
|
||||
if (!wire_read_int32 (channel, (guint32*) &(*params)[i].data.d_channel, 1))
|
||||
goto cleanup;
|
||||
break;
|
||||
|
||||
case PARAM_DRAWABLE:
|
||||
case GIMP_PDB_DRAWABLE:
|
||||
if (!wire_read_int32 (channel, (guint32*) &(*params)[i].data.d_drawable, 1))
|
||||
goto cleanup;
|
||||
break;
|
||||
|
||||
case PARAM_SELECTION:
|
||||
case GIMP_PDB_SELECTION:
|
||||
if (!wire_read_int32 (channel, (guint32*) &(*params)[i].data.d_selection, 1))
|
||||
goto cleanup;
|
||||
break;
|
||||
|
||||
case PARAM_BOUNDARY:
|
||||
case GIMP_PDB_BOUNDARY:
|
||||
if (!wire_read_int32 (channel, (guint32*) &(*params)[i].data.d_boundary, 1))
|
||||
goto cleanup;
|
||||
break;
|
||||
|
||||
case PARAM_PATH:
|
||||
case GIMP_PDB_PATH:
|
||||
if (!wire_read_int32 (channel, (guint32*) &(*params)[i].data.d_path, 1))
|
||||
goto cleanup;
|
||||
break;
|
||||
|
||||
case PARAM_PARASITE:
|
||||
case GIMP_PDB_PARASITE:
|
||||
if (!wire_read_string (channel, &(*params)[i].data.d_parasite.name, 1))
|
||||
goto cleanup;
|
||||
if ((*params)[i].data.d_parasite.name == NULL)
|
||||
|
@ -1168,12 +1168,12 @@ _gp_params_read (GIOChannel *channel,
|
|||
(*params)[i].data.d_parasite.data = NULL;
|
||||
break;
|
||||
|
||||
case PARAM_STATUS:
|
||||
case GIMP_PDB_STATUS:
|
||||
if (!wire_read_int32 (channel, (guint32*) &(*params)[i].data.d_status, 1))
|
||||
goto cleanup;
|
||||
break;
|
||||
|
||||
case PARAM_END:
|
||||
case GIMP_PDB_END:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -1203,62 +1203,62 @@ _gp_params_write (GIOChannel *channel,
|
|||
|
||||
switch (params[i].type)
|
||||
{
|
||||
case PARAM_INT32:
|
||||
case GIMP_PDB_INT32:
|
||||
if (!wire_write_int32 (channel, (guint32*) ¶ms[i].data.d_int32, 1))
|
||||
return;
|
||||
break;
|
||||
|
||||
case PARAM_INT16:
|
||||
case GIMP_PDB_INT16:
|
||||
if (!wire_write_int16 (channel, (guint16*) ¶ms[i].data.d_int16, 1))
|
||||
return;
|
||||
break;
|
||||
|
||||
case PARAM_INT8:
|
||||
case GIMP_PDB_INT8:
|
||||
if (!wire_write_int8 (channel, (guint8*) ¶ms[i].data.d_int8, 1))
|
||||
return;
|
||||
break;
|
||||
|
||||
case PARAM_FLOAT:
|
||||
case GIMP_PDB_FLOAT:
|
||||
if (!wire_write_double (channel, ¶ms[i].data.d_float, 1))
|
||||
return;
|
||||
break;
|
||||
|
||||
case PARAM_STRING:
|
||||
case GIMP_PDB_STRING:
|
||||
if (!wire_write_string (channel, ¶ms[i].data.d_string, 1))
|
||||
return;
|
||||
break;
|
||||
|
||||
case PARAM_INT32ARRAY:
|
||||
case GIMP_PDB_INT32ARRAY:
|
||||
if (!wire_write_int32 (channel, (guint32*) params[i].data.d_int32array,
|
||||
params[i-1].data.d_int32))
|
||||
return;
|
||||
break;
|
||||
|
||||
case PARAM_INT16ARRAY:
|
||||
case GIMP_PDB_INT16ARRAY:
|
||||
if (!wire_write_int16 (channel, (guint16*) params[i].data.d_int16array,
|
||||
params[i-1].data.d_int32))
|
||||
return;
|
||||
break;
|
||||
|
||||
case PARAM_INT8ARRAY:
|
||||
case GIMP_PDB_INT8ARRAY:
|
||||
if (!wire_write_int8 (channel, (guint8*) params[i].data.d_int8array,
|
||||
params[i-1].data.d_int32))
|
||||
return;
|
||||
break;
|
||||
|
||||
case PARAM_FLOATARRAY:
|
||||
case GIMP_PDB_FLOATARRAY:
|
||||
if (!wire_write_double (channel, params[i].data.d_floatarray,
|
||||
params[i-1].data.d_int32))
|
||||
return;
|
||||
break;
|
||||
|
||||
case PARAM_STRINGARRAY:
|
||||
case GIMP_PDB_STRINGARRAY:
|
||||
if (!wire_write_string (channel, params[i].data.d_stringarray,
|
||||
params[i-1].data.d_int32))
|
||||
return;
|
||||
break;
|
||||
|
||||
case PARAM_COLOR:
|
||||
case GIMP_PDB_COLOR:
|
||||
if (!wire_write_int8 (channel, (guint8*) ¶ms[i].data.d_color.red, 1))
|
||||
return;
|
||||
if (!wire_write_int8 (channel, (guint8*) ¶ms[i].data.d_color.green, 1))
|
||||
|
@ -1267,50 +1267,50 @@ _gp_params_write (GIOChannel *channel,
|
|||
return;
|
||||
break;
|
||||
|
||||
case PARAM_REGION:
|
||||
case GIMP_PDB_REGION:
|
||||
break;
|
||||
|
||||
case PARAM_DISPLAY:
|
||||
case GIMP_PDB_DISPLAY:
|
||||
if (!wire_write_int32 (channel, (guint32*) ¶ms[i].data.d_display, 1))
|
||||
return;
|
||||
break;
|
||||
|
||||
case PARAM_IMAGE:
|
||||
case GIMP_PDB_IMAGE:
|
||||
if (!wire_write_int32 (channel, (guint32*) ¶ms[i].data.d_image, 1))
|
||||
return;
|
||||
break;
|
||||
|
||||
case PARAM_LAYER:
|
||||
case GIMP_PDB_LAYER:
|
||||
if (!wire_write_int32 (channel, (guint32*) ¶ms[i].data.d_layer, 1))
|
||||
return;
|
||||
break;
|
||||
|
||||
case PARAM_CHANNEL:
|
||||
case GIMP_PDB_CHANNEL:
|
||||
if (!wire_write_int32 (channel, (guint32*) ¶ms[i].data.d_channel, 1))
|
||||
return;
|
||||
break;
|
||||
|
||||
case PARAM_DRAWABLE:
|
||||
case GIMP_PDB_DRAWABLE:
|
||||
if (!wire_write_int32 (channel, (guint32*) ¶ms[i].data.d_drawable, 1))
|
||||
return;
|
||||
break;
|
||||
|
||||
case PARAM_SELECTION:
|
||||
case GIMP_PDB_SELECTION:
|
||||
if (!wire_write_int32 (channel, (guint32*) ¶ms[i].data.d_selection, 1))
|
||||
return;
|
||||
break;
|
||||
|
||||
case PARAM_BOUNDARY:
|
||||
case GIMP_PDB_BOUNDARY:
|
||||
if (!wire_write_int32 (channel, (guint32*) ¶ms[i].data.d_boundary, 1))
|
||||
return;
|
||||
break;
|
||||
|
||||
case PARAM_PATH:
|
||||
case GIMP_PDB_PATH:
|
||||
if (!wire_write_int32 (channel, (guint32*) ¶ms[i].data.d_path, 1))
|
||||
return;
|
||||
break;
|
||||
|
||||
case PARAM_PARASITE:
|
||||
case GIMP_PDB_PARASITE:
|
||||
{
|
||||
GimpParasite *p = (GimpParasite *) ¶ms[i].data.d_parasite;
|
||||
if (p->name == NULL)
|
||||
|
@ -1333,12 +1333,12 @@ _gp_params_write (GIOChannel *channel,
|
|||
}
|
||||
break;
|
||||
|
||||
case PARAM_STATUS:
|
||||
case GIMP_PDB_STATUS:
|
||||
if (!wire_write_int32 (channel, (guint32*) ¶ms[i].data.d_status, 1))
|
||||
return;
|
||||
break;
|
||||
|
||||
case PARAM_END:
|
||||
case GIMP_PDB_END:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -1355,45 +1355,45 @@ _gp_params_destroy (GPParam *params,
|
|||
{
|
||||
switch (params[i].type)
|
||||
{
|
||||
case PARAM_INT32:
|
||||
case PARAM_INT16:
|
||||
case PARAM_INT8:
|
||||
case PARAM_FLOAT:
|
||||
case PARAM_COLOR:
|
||||
case PARAM_REGION:
|
||||
case PARAM_DISPLAY:
|
||||
case PARAM_IMAGE:
|
||||
case PARAM_LAYER:
|
||||
case PARAM_CHANNEL:
|
||||
case PARAM_DRAWABLE:
|
||||
case PARAM_SELECTION:
|
||||
case PARAM_BOUNDARY:
|
||||
case PARAM_PATH:
|
||||
case PARAM_STATUS:
|
||||
case GIMP_PDB_INT32:
|
||||
case GIMP_PDB_INT16:
|
||||
case GIMP_PDB_INT8:
|
||||
case GIMP_PDB_FLOAT:
|
||||
case GIMP_PDB_COLOR:
|
||||
case GIMP_PDB_REGION:
|
||||
case GIMP_PDB_DISPLAY:
|
||||
case GIMP_PDB_IMAGE:
|
||||
case GIMP_PDB_LAYER:
|
||||
case GIMP_PDB_CHANNEL:
|
||||
case GIMP_PDB_DRAWABLE:
|
||||
case GIMP_PDB_SELECTION:
|
||||
case GIMP_PDB_BOUNDARY:
|
||||
case GIMP_PDB_PATH:
|
||||
case GIMP_PDB_STATUS:
|
||||
break;
|
||||
|
||||
case PARAM_STRING:
|
||||
case GIMP_PDB_STRING:
|
||||
g_free (params[i].data.d_string);
|
||||
break;
|
||||
|
||||
case PARAM_INT32ARRAY:
|
||||
case GIMP_PDB_INT32ARRAY:
|
||||
g_free (params[i].data.d_int32array);
|
||||
break;
|
||||
|
||||
case PARAM_INT16ARRAY:
|
||||
case GIMP_PDB_INT16ARRAY:
|
||||
g_free (params[i].data.d_int16array);
|
||||
break;
|
||||
|
||||
case PARAM_INT8ARRAY:
|
||||
case GIMP_PDB_INT8ARRAY:
|
||||
g_free (params[i].data.d_int8array);
|
||||
break;
|
||||
|
||||
case PARAM_FLOATARRAY:
|
||||
case GIMP_PDB_FLOATARRAY:
|
||||
g_free (params[i].data.d_floatarray);
|
||||
break;
|
||||
|
||||
case PARAM_STRINGARRAY:
|
||||
if ((i > 0) && (params[i-1].type == PARAM_INT32))
|
||||
case GIMP_PDB_STRINGARRAY:
|
||||
if ((i > 0) && (params[i-1].type == GIMP_PDB_INT32))
|
||||
{
|
||||
count = params[i-1].data.d_int32;
|
||||
for (j = 0; j < count; j++)
|
||||
|
@ -1402,14 +1402,14 @@ _gp_params_destroy (GPParam *params,
|
|||
}
|
||||
break;
|
||||
|
||||
case PARAM_PARASITE:
|
||||
case GIMP_PDB_PARASITE:
|
||||
if (params[i].data.d_parasite.name)
|
||||
g_free(params[i].data.d_parasite.name);
|
||||
if (params[i].data.d_parasite.data)
|
||||
g_free(params[i].data.d_parasite.data);
|
||||
break;
|
||||
|
||||
case PARAM_END:
|
||||
case GIMP_PDB_END:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1133,22 +1133,16 @@ list_button_press (GtkWidget *widget,
|
|||
void
|
||||
plug_in_parse_fractalexplorer_path (void)
|
||||
{
|
||||
GParam *return_vals;
|
||||
gint nreturn_vals;
|
||||
|
||||
GList *fail_list = NULL;
|
||||
GList *list;
|
||||
gchar *fractalexplorer_path;
|
||||
|
||||
gimp_path_free (fractalexplorer_path_list);
|
||||
fractalexplorer_path_list = NULL;
|
||||
|
||||
return_vals = gimp_run_procedure ("gimp_gimprc_query",
|
||||
&nreturn_vals,
|
||||
PARAM_STRING, "fractalexplorer-path",
|
||||
PARAM_END);
|
||||
fractalexplorer_path = gimp_gimprc_query ("fractalexplorer-path");
|
||||
|
||||
if (return_vals[0].data.d_status != STATUS_SUCCESS ||
|
||||
return_vals[1].data.d_string == NULL)
|
||||
if (!fractalexplorer_path)
|
||||
{
|
||||
gchar *gimprc = gimp_personal_rc_file ("gimprc");
|
||||
gchar *path = gimp_strescape
|
||||
|
@ -1162,14 +1156,13 @@ plug_in_parse_fractalexplorer_path (void)
|
|||
"to your %s file."), path, gimprc);
|
||||
g_free (gimprc);
|
||||
g_free (path);
|
||||
gimp_destroy_params (return_vals, nreturn_vals);
|
||||
return;
|
||||
}
|
||||
|
||||
fractalexplorer_path_list = gimp_path_parse (return_vals[1].data.d_string,
|
||||
fractalexplorer_path_list = gimp_path_parse (fractalexplorer_path,
|
||||
16, TRUE, &fail_list);
|
||||
|
||||
gimp_destroy_params (return_vals, nreturn_vals);
|
||||
g_free (fractalexplorer_path);
|
||||
|
||||
if (fail_list)
|
||||
{
|
||||
|
|
|
@ -378,7 +378,7 @@ film (void)
|
|||
gint i, j, k, picture_count;
|
||||
gdouble f;
|
||||
guchar f_red, f_green, f_blue;
|
||||
gint nreturn_vals, num_layers;
|
||||
gint num_layers;
|
||||
gint32 *image_ID_src, image_ID_dst, layer_ID_src, layer_ID_dst;
|
||||
gint32 *layers;
|
||||
GDrawable *drawable_dst;
|
||||
|
@ -568,9 +568,8 @@ film (void)
|
|||
g_free (layers);
|
||||
|
||||
/* Drawing text/numbers leaves us with a floating selection. Stop it */
|
||||
gimp_run_procedure ("gimp_floating_sel_anchor", &nreturn_vals,
|
||||
PARAM_LAYER, gimp_image_floating_selection (image_ID_dst),
|
||||
PARAM_END);
|
||||
gimp_floating_sel_anchor (gimp_image_floating_selection (image_ID_dst));
|
||||
|
||||
/* Restore foreground */
|
||||
gimp_palette_set_foreground (f_red, f_green, f_blue);
|
||||
|
||||
|
@ -907,10 +906,11 @@ draw_number (gint32 layer_ID,
|
|||
gint height)
|
||||
{
|
||||
gchar buf[32];
|
||||
GDrawable *drw;
|
||||
GParam *params = NULL;
|
||||
gint nreturn_vals, k, delta, max_delta;
|
||||
gint32 image_ID, descent;
|
||||
GimpDrawable *drw;
|
||||
gint k, delta, max_delta;
|
||||
gint32 image_ID;
|
||||
gint32 text_layer_ID;
|
||||
gint text_width, text_height, text_ascent, descent;
|
||||
gchar *family = filmvals.number_fontf;
|
||||
|
||||
g_snprintf (buf, sizeof (buf), "%d", num);
|
||||
|
@ -927,54 +927,50 @@ draw_number (gint32 layer_ID,
|
|||
{ /* Try different font sizes if inquire of extent failed */
|
||||
delta = (k+1) / 2;
|
||||
if ((k & 1) == 0) delta = -delta;
|
||||
params = gimp_run_procedure ("gimp_text_get_extents", &nreturn_vals,
|
||||
PARAM_STRING, buf,
|
||||
PARAM_FLOAT, (gfloat)(height+delta),
|
||||
PARAM_INT32, (gint32)0, /* use pixelsize */
|
||||
PARAM_STRING, "*", /* foundry */
|
||||
PARAM_STRING, family, /* family */
|
||||
PARAM_STRING, "*", /* weight */
|
||||
PARAM_STRING, "*", /* slant */
|
||||
PARAM_STRING, "*", /* set_width */
|
||||
PARAM_STRING, "*", /* spacing */
|
||||
PARAM_STRING, "*",
|
||||
PARAM_STRING, "*",
|
||||
PARAM_END);
|
||||
|
||||
if (params[0].data.d_status == STATUS_SUCCESS)
|
||||
gimp_text_get_extents (buf,
|
||||
height+delta,
|
||||
GIMP_PIXELS,
|
||||
"*", /* foundry */
|
||||
family, /* family */
|
||||
"*", /* weight */
|
||||
"*", /* slant */
|
||||
"*", /* set_width */
|
||||
"*", /* spacing */
|
||||
"*",
|
||||
"*",
|
||||
&text_width,
|
||||
&text_height,
|
||||
&text_ascent,
|
||||
&descent);
|
||||
|
||||
if (text_width) /* FIXME: use return_value of gimp_text_get_extens */
|
||||
{
|
||||
height += delta;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (params[0].data.d_status == STATUS_SUCCESS)
|
||||
descent = params[4].data.d_int32;
|
||||
else
|
||||
descent = 0;
|
||||
text_layer_ID = gimp_text (image_ID,
|
||||
layer_ID,
|
||||
x,
|
||||
y+descent/2,
|
||||
buf,
|
||||
1, /* border */
|
||||
FALSE, /* antialias */
|
||||
height,
|
||||
GIMP_PIXELS,
|
||||
"*", /* foundry */
|
||||
family, /* family */
|
||||
"*", /* weight */
|
||||
"*", /* slant */
|
||||
"*", /* set_width */
|
||||
"*", /* spacing */
|
||||
"*",
|
||||
"*");
|
||||
|
||||
params = gimp_run_procedure ("gimp_text", &nreturn_vals,
|
||||
PARAM_IMAGE, image_ID,
|
||||
PARAM_DRAWABLE, layer_ID,
|
||||
PARAM_FLOAT, (gfloat)x,
|
||||
PARAM_FLOAT, (gfloat)(y+descent/2),
|
||||
PARAM_STRING, buf,
|
||||
PARAM_INT32, (gint32)1, /* border */
|
||||
PARAM_INT32, (gint32)0, /* antialias */
|
||||
PARAM_FLOAT, (gfloat)height,
|
||||
PARAM_INT32, (gint32)0, /* use pixelsize */
|
||||
PARAM_STRING, "*", /* foundry */
|
||||
PARAM_STRING, family, /* family */
|
||||
PARAM_STRING, "*", /* weight */
|
||||
PARAM_STRING, "*", /* slant */
|
||||
PARAM_STRING, "*", /* set_width */
|
||||
PARAM_STRING, "*", /* spacing */
|
||||
PARAM_STRING, "*",
|
||||
PARAM_STRING, "*",
|
||||
PARAM_END);
|
||||
|
||||
if (params[0].data.d_status != STATUS_SUCCESS)
|
||||
printf ("draw_number: Error in drawing text\n");
|
||||
if (text_layer_ID == -1)
|
||||
g_message ("draw_number: Error in drawing text\n");
|
||||
|
||||
gimp_drawable_detach (drw);
|
||||
}
|
||||
|
|
|
@ -1761,33 +1761,6 @@ p_smp_dialog (void)
|
|||
return (0);
|
||||
} /* end p_smp_dialog */
|
||||
|
||||
/* ============================================================================
|
||||
* p_gimp_convert_rgb
|
||||
* PDB Call
|
||||
* ============================================================================
|
||||
*/
|
||||
gint
|
||||
p_gimp_convert_rgb (gint32 image_id)
|
||||
{
|
||||
static gchar *l_gimp_convert_rgb_proc = "gimp_convert_rgb";
|
||||
GParam *return_vals;
|
||||
gint nreturn_vals;
|
||||
|
||||
return_vals = gimp_run_procedure (l_gimp_convert_rgb_proc,
|
||||
&nreturn_vals,
|
||||
PARAM_IMAGE, image_id,
|
||||
PARAM_END);
|
||||
|
||||
if (return_vals[0].data.d_status == STATUS_SUCCESS)
|
||||
{
|
||||
return(TRUE);
|
||||
}
|
||||
printf("Error: PDB call of %s failed staus=%d\n",
|
||||
l_gimp_convert_rgb_proc, (int)return_vals[0].data.d_status);
|
||||
return(FALSE);
|
||||
} /* end p_gimp_convert_rgb */
|
||||
|
||||
|
||||
/* -----------------------------
|
||||
* DEBUG print procedures START
|
||||
* -----------------------------
|
||||
|
@ -3222,7 +3195,7 @@ p_main_colorize(gint mc_flags)
|
|||
{
|
||||
if(mc_flags & MC_DST_REMAP)
|
||||
{
|
||||
p_gimp_convert_rgb(gimp_layer_get_image_id(g_values.dst_id));
|
||||
gimp_convert_rgb(gimp_layer_get_image_id(g_values.dst_id));
|
||||
}
|
||||
}
|
||||
p_colorize_drawable(dst_drawable->id);
|
||||
|
|
|
@ -92,7 +92,7 @@ static void gdt_query(void)
|
|||
"Marco Lamberto <lm@geocities.com>",
|
||||
"Marco Lamberto",
|
||||
"Jan 1999",
|
||||
_("<Image>/Filters/Render/Dynamic Text..."),
|
||||
N_("<Image>/Filters/Render/Dynamic Text..."),
|
||||
"RGB*,GRAY*,INDEXED*",
|
||||
PROC_PLUG_IN,
|
||||
ngdt_args, ngdt_rets, gdt_args, gdt_rets);
|
||||
|
|
|
@ -94,18 +94,6 @@ extern void * gdk_root_parent;
|
|||
|
||||
#include "pix_data.h"
|
||||
|
||||
/* If you have NOT applied the patch to the GIMP (See readme) remove the
|
||||
* following #define
|
||||
*/
|
||||
|
||||
#define HAVE_PATCHED 1
|
||||
|
||||
#ifdef HAVE_PATCHED
|
||||
#define GFIG_LCC 1
|
||||
#else
|
||||
#define GFIG_LCC 2
|
||||
#endif /* HAVE_PATCHED */
|
||||
|
||||
/***** Magic numbers *****/
|
||||
|
||||
#define PREVIEW_SIZE 400
|
||||
|
@ -822,24 +810,18 @@ gfig_clear_selection (gint32 image_ID)
|
|||
static void
|
||||
plug_in_parse_gfig_path (void)
|
||||
{
|
||||
GParam *return_vals;
|
||||
gint nreturn_vals;
|
||||
|
||||
GList *fail_list = NULL;
|
||||
GList *list;
|
||||
gchar *gfig_path;
|
||||
|
||||
if (gfig_path_list)
|
||||
gimp_path_free (gfig_path_list);
|
||||
|
||||
gfig_path_list = NULL;
|
||||
|
||||
return_vals = gimp_run_procedure ("gimp_gimprc_query",
|
||||
&nreturn_vals,
|
||||
PARAM_STRING, "gfig-path",
|
||||
PARAM_END);
|
||||
gfig_path = gimp_gimprc_query ("gfig-path");
|
||||
|
||||
if (return_vals[0].data.d_status != STATUS_SUCCESS ||
|
||||
return_vals[1].data.d_string == NULL)
|
||||
if (!gfig_path)
|
||||
{
|
||||
gchar *gimprc = gimp_personal_rc_file ("gimprc");
|
||||
gchar *path = gimp_strescape
|
||||
|
@ -854,14 +836,12 @@ plug_in_parse_gfig_path (void)
|
|||
path, gimprc);
|
||||
g_free (gimprc);
|
||||
g_free (path);
|
||||
gimp_destroy_params (return_vals, nreturn_vals);
|
||||
return;
|
||||
}
|
||||
|
||||
gfig_path_list = gimp_path_parse (return_vals[1].data.d_string,
|
||||
16, TRUE, &fail_list);
|
||||
gfig_path_list = gimp_path_parse (gfig_path, 16, TRUE, &fail_list);
|
||||
|
||||
gimp_destroy_params (return_vals, nreturn_vals);
|
||||
g_free (gfig_path);
|
||||
|
||||
if (fail_list)
|
||||
{
|
||||
|
@ -2538,14 +2518,49 @@ mygimp_brush_info (gint32 *width,
|
|||
gimp_destroy_params (return_vals, nreturn_vals);
|
||||
}
|
||||
|
||||
static void
|
||||
gfig_paint (BrushType brush_type,
|
||||
gint32 drawable_ID,
|
||||
gint seg_count,
|
||||
gdouble line_pnts[])
|
||||
{
|
||||
switch (brush_type)
|
||||
{
|
||||
case BRUSH_BRUSH_TYPE:
|
||||
gimp_paintbrush (drawable_ID,
|
||||
selvals.brushfade,
|
||||
seg_count, line_pnts,
|
||||
GIMP_HARD,
|
||||
0.0);
|
||||
break;
|
||||
|
||||
case BRUSH_PENCIL_TYPE:
|
||||
gimp_pencil (drawable_ID,
|
||||
seg_count, line_pnts);
|
||||
break;
|
||||
|
||||
case BRUSH_AIRBRUSH_TYPE:
|
||||
gimp_airbrush (drawable_ID,
|
||||
selvals.airbrushpressure,
|
||||
seg_count, line_pnts);
|
||||
break;
|
||||
|
||||
case BRUSH_PATTERN_TYPE:
|
||||
gimp_clone (drawable_ID,
|
||||
drawable_ID,
|
||||
GIMP_PATTERN_CLONE,
|
||||
0.0, 0.0,
|
||||
seg_count, line_pnts);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static gint32
|
||||
gfig_gen_brush_preview (BrushDesc *bdesc)
|
||||
{
|
||||
/* Given the name of a brush then paint it and return the ID of the image
|
||||
* the preview can be got from
|
||||
*/
|
||||
GParam *return_vals = NULL;
|
||||
int nreturn_vals;
|
||||
static gint32 layer_ID = -1;
|
||||
guchar fR, fG, fB;
|
||||
guchar bR, bG, bB;
|
||||
|
@ -2603,50 +2618,9 @@ gfig_gen_brush_preview (BrushDesc *bdesc)
|
|||
gimp_drawable_fill (layer_ID, 1); /* Clear... Fill with white ... */
|
||||
|
||||
/* Blob of paint */
|
||||
|
||||
switch (selvals.brshtype)
|
||||
{
|
||||
case BRUSH_BRUSH_TYPE:
|
||||
return_vals = gimp_run_procedure ("gimp_paintbrush", &nreturn_vals,
|
||||
PARAM_DRAWABLE, layer_ID,
|
||||
PARAM_FLOAT, 0.0,
|
||||
PARAM_INT32, 2*GFIG_LCC,/* GIMP BUG should be 2!!!!*/
|
||||
PARAM_FLOATARRAY, &line_pnts[0],
|
||||
PARAM_INT32, 0,
|
||||
PARAM_FLOAT, 0.0,
|
||||
PARAM_END);
|
||||
break;
|
||||
case BRUSH_PENCIL_TYPE:
|
||||
return_vals = gimp_run_procedure ("gimp_pencil", &nreturn_vals,
|
||||
PARAM_DRAWABLE, layer_ID,
|
||||
PARAM_INT32, 2,
|
||||
PARAM_FLOATARRAY, &line_pnts[0],
|
||||
PARAM_END);
|
||||
break;
|
||||
case BRUSH_AIRBRUSH_TYPE:
|
||||
return_vals = gimp_run_procedure ("gimp_airbrush", &nreturn_vals,
|
||||
PARAM_DRAWABLE, layer_ID,
|
||||
PARAM_FLOAT, (gdouble)selvals.airbrushpressure,
|
||||
PARAM_INT32, 2,
|
||||
PARAM_FLOATARRAY, &line_pnts[0],
|
||||
PARAM_END);
|
||||
break;
|
||||
case BRUSH_PATTERN_TYPE:
|
||||
return_vals = gimp_run_procedure ("gimp_clone", &nreturn_vals,
|
||||
PARAM_DRAWABLE, layer_ID,
|
||||
PARAM_DRAWABLE, layer_ID,
|
||||
PARAM_INT32, 1,
|
||||
PARAM_FLOAT, (gdouble)0.0,
|
||||
PARAM_FLOAT, (gdouble)0.0,
|
||||
PARAM_INT32, 2,
|
||||
PARAM_FLOATARRAY, &line_pnts[0],
|
||||
PARAM_END);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
gimp_destroy_params (return_vals, nreturn_vals);
|
||||
gfig_paint (selvals.brshtype,
|
||||
layer_ID,
|
||||
2, line_pnts);
|
||||
|
||||
gimp_palette_set_background (bR, bG, bB);
|
||||
gimp_palette_set_foreground (fR, fG, fB);
|
||||
|
@ -4623,47 +4597,11 @@ load_button_callback (GtkWidget *widget,
|
|||
gtk_widget_show (window);
|
||||
}
|
||||
|
||||
#if 0 /* NOT USED */
|
||||
static void
|
||||
mygimp_edit_clear (gint32 image_ID, gint32 layer_ID)
|
||||
{
|
||||
GParam *return_vals;
|
||||
int nreturn_vals;
|
||||
return_vals = gimp_run_procedure ("gimp_edit_clear",
|
||||
&nreturn_vals,
|
||||
PARAM_IMAGE, image_ID,
|
||||
PARAM_DRAWABLE, layer_ID,
|
||||
PARAM_END);
|
||||
gimp_destroy_params (return_vals, nreturn_vals);
|
||||
}
|
||||
#endif /* NOT USED */
|
||||
|
||||
static gint32
|
||||
mygimp_layer_copy (gint32 layer_ID)
|
||||
{
|
||||
GParam *return_vals;
|
||||
int nreturn_vals;
|
||||
|
||||
return_vals = gimp_run_procedure ("gimp_layer_copy",
|
||||
&nreturn_vals,
|
||||
PARAM_LAYER, layer_ID,
|
||||
PARAM_INT32, 0,
|
||||
PARAM_END);
|
||||
|
||||
layer_ID = -1;
|
||||
if (return_vals[0].data.d_status == STATUS_SUCCESS)
|
||||
layer_ID = return_vals[1].data.d_layer;
|
||||
|
||||
gimp_destroy_params (return_vals, nreturn_vals);
|
||||
|
||||
return layer_ID;
|
||||
}
|
||||
|
||||
static void
|
||||
paint_layer_copy (gchar *new_name)
|
||||
{
|
||||
gint32 old_drawable = gfig_drawable;
|
||||
if ((gfig_drawable = mygimp_layer_copy (gfig_drawable)) < 0)
|
||||
if ((gfig_drawable = gimp_layer_copy (gfig_drawable)) < 0)
|
||||
{
|
||||
g_warning (_("Error in copy layer for onlayers"));
|
||||
gfig_drawable = old_drawable;
|
||||
|
@ -4734,22 +4672,14 @@ paint_layer_new (gchar *new_name)
|
|||
static void
|
||||
paint_layer_fill ()
|
||||
{
|
||||
GParam *return_vals;
|
||||
int nreturn_vals;
|
||||
|
||||
return_vals = gimp_run_procedure ("gimp_bucket_fill",
|
||||
&nreturn_vals,
|
||||
PARAM_DRAWABLE, gfig_drawable,
|
||||
PARAM_INT32, selopt.fill_type, /* Fill mode */
|
||||
PARAM_INT32, 0, /* NORMAL */
|
||||
PARAM_FLOAT, (gdouble)selopt.fill_opacity, /* Fill opacity */
|
||||
PARAM_FLOAT, (gdouble)0.0, /* threshold - ignored */
|
||||
PARAM_INT32, 0, /* Sample merged - ignored */
|
||||
PARAM_FLOAT, (gdouble)0.0, /* x - ignored */
|
||||
PARAM_FLOAT, (gdouble)0.0, /* y - ignored */
|
||||
PARAM_END);
|
||||
|
||||
gimp_destroy_params (return_vals, nreturn_vals);
|
||||
gimp_bucket_fill (gfig_drawable,
|
||||
selopt.fill_type, /* Fill mode */
|
||||
GIMP_NORMAL_MODE,
|
||||
selopt.fill_opacity, /* Fill opacity */
|
||||
0.0, /* threshold - ignored */
|
||||
FALSE, /* Sample merged - ignored */
|
||||
0.0, /* x - ignored */
|
||||
0.0); /* y - ignored */
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -6834,8 +6764,6 @@ d_paint_line (Dobject *obj)
|
|||
{
|
||||
DobjPoints * spnt;
|
||||
gdouble *line_pnts;
|
||||
GParam *return_vals = NULL;
|
||||
gint nreturn_vals;
|
||||
gint seg_count = 0;
|
||||
gint i = 0;
|
||||
|
||||
|
@ -6854,8 +6782,7 @@ d_paint_line (Dobject *obj)
|
|||
if (!spnt || !seg_count)
|
||||
return; /* no-line */
|
||||
|
||||
/* The second *2 to get around bug in GIMP */
|
||||
line_pnts = g_new0 (gdouble, GFIG_LCC*(2*seg_count + 1));
|
||||
line_pnts = g_new0 (gdouble, 2 * seg_count + 1);
|
||||
|
||||
/* Go around all the points drawing a line from one to the next */
|
||||
while (spnt)
|
||||
|
@ -6878,64 +6805,20 @@ d_paint_line (Dobject *obj)
|
|||
/* One go */
|
||||
if (selvals.painttype == PAINT_BRUSH_TYPE)
|
||||
{
|
||||
switch (selvals.brshtype)
|
||||
{
|
||||
case BRUSH_BRUSH_TYPE:
|
||||
return_vals = gimp_run_procedure ("gimp_paintbrush", &nreturn_vals,
|
||||
PARAM_DRAWABLE, gfig_drawable,
|
||||
PARAM_FLOAT, (gdouble)selvals.brushfade,
|
||||
PARAM_INT32, seg_count*2*GFIG_LCC,/* GIMP BUG should be 2!!!!*/
|
||||
PARAM_FLOATARRAY, &line_pnts[0],
|
||||
PARAM_INT32, 0,
|
||||
PARAM_FLOAT, 0.0,
|
||||
PARAM_END);
|
||||
break;
|
||||
case BRUSH_PENCIL_TYPE:
|
||||
return_vals = gimp_run_procedure ("gimp_pencil", &nreturn_vals,
|
||||
PARAM_DRAWABLE, gfig_drawable,
|
||||
PARAM_INT32, seg_count*2,
|
||||
PARAM_FLOATARRAY, &line_pnts[0],
|
||||
PARAM_END);
|
||||
break;
|
||||
case BRUSH_AIRBRUSH_TYPE:
|
||||
return_vals = gimp_run_procedure ("gimp_airbrush", &nreturn_vals,
|
||||
PARAM_DRAWABLE, gfig_drawable,
|
||||
PARAM_FLOAT, (gdouble)selvals.airbrushpressure,
|
||||
PARAM_INT32, seg_count*2,
|
||||
PARAM_FLOATARRAY, &line_pnts[0],
|
||||
PARAM_END);
|
||||
break;
|
||||
case BRUSH_PATTERN_TYPE:
|
||||
return_vals = gimp_run_procedure ("gimp_clone", &nreturn_vals,
|
||||
PARAM_DRAWABLE, gfig_drawable,
|
||||
PARAM_DRAWABLE, gfig_drawable,
|
||||
PARAM_INT32, 1,
|
||||
PARAM_FLOAT, (gdouble)0.0,
|
||||
PARAM_FLOAT, (gdouble)0.0,
|
||||
PARAM_INT32, seg_count*2,
|
||||
PARAM_FLOATARRAY, &line_pnts[0],
|
||||
PARAM_END);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
gfig_paint (selvals.brshtype,
|
||||
gfig_drawable,
|
||||
seg_count * 2, line_pnts);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* We want to do a selection */
|
||||
return_vals = gimp_run_procedure ("gimp_free_select", &nreturn_vals,
|
||||
PARAM_IMAGE, gfig_image,
|
||||
PARAM_INT32, seg_count*2,
|
||||
PARAM_FLOATARRAY, &line_pnts[0],
|
||||
PARAM_INT32, selopt.type,
|
||||
PARAM_INT32, selopt.antia,
|
||||
PARAM_INT32, selopt.feather,
|
||||
PARAM_FLOAT, (gdouble)selopt.feather_radius,
|
||||
PARAM_END);
|
||||
gimp_free_select (gfig_image,
|
||||
seg_count * 2, line_pnts,
|
||||
selopt.type,
|
||||
selopt.antia,
|
||||
selopt.feather,
|
||||
selopt.feather_radius);
|
||||
}
|
||||
|
||||
gimp_destroy_params (return_vals, nreturn_vals);
|
||||
|
||||
g_free (line_pnts);
|
||||
}
|
||||
|
||||
|
@ -7341,29 +7224,19 @@ d_paint_circle (Dobject *obj)
|
|||
else
|
||||
scale_to_xy (&dpnts[0], 2);
|
||||
|
||||
return_vals = gimp_run_procedure ("gimp_ellipse_select", &nreturn_vals,
|
||||
PARAM_IMAGE, gfig_image,
|
||||
PARAM_FLOAT, dpnts[0],
|
||||
PARAM_FLOAT, dpnts[1],
|
||||
PARAM_FLOAT, dpnts[2],
|
||||
PARAM_FLOAT, dpnts[3],
|
||||
PARAM_INT32, selopt.type,
|
||||
PARAM_INT32, selopt.antia,
|
||||
PARAM_INT32, selopt.feather,
|
||||
PARAM_FLOAT, (gdouble)selopt.feather_radius,
|
||||
PARAM_END);
|
||||
|
||||
gimp_destroy_params (return_vals, nreturn_vals);
|
||||
gimp_ellipse_select (gfig_image,
|
||||
dpnts[0], dpnts[1],
|
||||
dpnts[2], dpnts[3],
|
||||
selopt.type,
|
||||
selopt.antia,
|
||||
selopt.feather,
|
||||
selopt.feather_radius);
|
||||
|
||||
/* Is selection all we need ? */
|
||||
if (selvals.painttype == PAINT_SELECTION_TYPE)
|
||||
return;
|
||||
|
||||
return_vals = gimp_run_procedure ("gimp_edit_stroke", &nreturn_vals,
|
||||
PARAM_DRAWABLE, gfig_drawable,
|
||||
PARAM_END);
|
||||
|
||||
gimp_destroy_params (return_vals, nreturn_vals);
|
||||
gimp_edit_stroke (gfig_drawable);
|
||||
|
||||
return_vals = gimp_run_procedure ("gimp_selection_clear", &nreturn_vals,
|
||||
PARAM_IMAGE, gfig_image,
|
||||
|
@ -7660,8 +7533,6 @@ d_paint_approx_ellipse (Dobject *obj)
|
|||
/* first point center */
|
||||
/* Next point is radius */
|
||||
gdouble *line_pnts;
|
||||
GParam *return_vals = NULL;
|
||||
gint nreturn_vals;
|
||||
gint seg_count = 0;
|
||||
gint i = 0;
|
||||
DobjPoints * center_pnt;
|
||||
|
@ -7685,8 +7556,7 @@ d_paint_approx_ellipse (Dobject *obj)
|
|||
if (!center_pnt || !seg_count)
|
||||
return; /* no-line */
|
||||
|
||||
/* The second 2* to get around bug in GIMP */
|
||||
line_pnts = g_new0 (gdouble, GFIG_LCC * (2 * seg_count + 1));
|
||||
line_pnts = g_new0 (gdouble, 2 * seg_count + 1);
|
||||
|
||||
/* Go around all the points drawing a line from one to the next */
|
||||
|
||||
|
@ -7752,65 +7622,20 @@ d_paint_approx_ellipse (Dobject *obj)
|
|||
/* One go */
|
||||
if (selvals.painttype == PAINT_BRUSH_TYPE)
|
||||
{
|
||||
switch (selvals.brshtype)
|
||||
{
|
||||
case BRUSH_BRUSH_TYPE:
|
||||
return_vals = gimp_run_procedure ("gimp_paintbrush", &nreturn_vals,
|
||||
PARAM_DRAWABLE, gfig_drawable,
|
||||
PARAM_FLOAT, (gdouble)selvals.brushfade,
|
||||
PARAM_INT32, (i/2)*2*GFIG_LCC,/* GIMP BUG should be 2!!!!*/
|
||||
PARAM_FLOATARRAY, &line_pnts[0],
|
||||
PARAM_INT32, 0,
|
||||
PARAM_FLOAT, 0.0,
|
||||
PARAM_END);
|
||||
break;
|
||||
case BRUSH_PENCIL_TYPE:
|
||||
return_vals = gimp_run_procedure ("gimp_pencil", &nreturn_vals,
|
||||
PARAM_DRAWABLE, gfig_drawable,
|
||||
PARAM_INT32, (i/2)*2,
|
||||
PARAM_FLOATARRAY, &line_pnts[0],
|
||||
PARAM_END);
|
||||
break;
|
||||
case BRUSH_AIRBRUSH_TYPE:
|
||||
return_vals = gimp_run_procedure ("gimp_airbrush", &nreturn_vals,
|
||||
PARAM_DRAWABLE, gfig_drawable,
|
||||
PARAM_FLOAT, (gdouble)selvals.airbrushpressure,
|
||||
PARAM_INT32, (i/2)*2,
|
||||
PARAM_FLOATARRAY, &line_pnts[0],
|
||||
PARAM_END);
|
||||
break;
|
||||
case BRUSH_PATTERN_TYPE:
|
||||
return_vals = gimp_run_procedure ("gimp_clone", &nreturn_vals,
|
||||
PARAM_DRAWABLE, gfig_drawable,
|
||||
PARAM_DRAWABLE, gfig_drawable,
|
||||
PARAM_INT32, 1,
|
||||
PARAM_FLOAT, (gdouble)0.0,
|
||||
PARAM_FLOAT, (gdouble)0.0,
|
||||
PARAM_INT32, (i/2)*2,
|
||||
PARAM_FLOATARRAY, &line_pnts[0],
|
||||
PARAM_END);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
gfig_paint (selvals.brshtype,
|
||||
gfig_drawable,
|
||||
i, line_pnts);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* We want to do a selection */
|
||||
return_vals = gimp_run_procedure ("gimp_free_select", &nreturn_vals,
|
||||
PARAM_IMAGE, gfig_image,
|
||||
PARAM_INT32, (i/2)*2,
|
||||
PARAM_FLOATARRAY, &line_pnts[0],
|
||||
PARAM_INT32, selopt.type,
|
||||
PARAM_INT32, selopt.antia,
|
||||
PARAM_INT32, selopt.feather,
|
||||
PARAM_FLOAT, (gdouble)selopt.feather_radius,
|
||||
PARAM_END);
|
||||
|
||||
gimp_free_select (gfig_image,
|
||||
i, line_pnts,
|
||||
selopt.type,
|
||||
selopt.antia,
|
||||
selopt.feather,
|
||||
selopt.feather_radius);
|
||||
}
|
||||
|
||||
gimp_destroy_params (return_vals, nreturn_vals);
|
||||
|
||||
g_free (line_pnts);
|
||||
}
|
||||
|
||||
|
@ -7882,29 +7707,19 @@ d_paint_ellipse (Dobject *obj)
|
|||
scale_to_xy (&dpnts[0], 2);
|
||||
|
||||
|
||||
return_vals = gimp_run_procedure ("gimp_ellipse_select", &nreturn_vals,
|
||||
PARAM_IMAGE, gfig_image,
|
||||
PARAM_FLOAT, dpnts[0],
|
||||
PARAM_FLOAT, dpnts[1],
|
||||
PARAM_FLOAT, dpnts[2],
|
||||
PARAM_FLOAT, dpnts[3],
|
||||
PARAM_INT32, selopt.type,
|
||||
PARAM_INT32, selopt.antia,
|
||||
PARAM_INT32, selopt.feather,
|
||||
PARAM_FLOAT, (gdouble)selopt.feather_radius,
|
||||
PARAM_END);
|
||||
|
||||
gimp_destroy_params (return_vals, nreturn_vals);
|
||||
gimp_ellipse_select (gfig_image,
|
||||
dpnts[0], dpnts[1],
|
||||
dpnts[2], dpnts[3],
|
||||
selopt.type,
|
||||
selopt.antia,
|
||||
selopt.feather,
|
||||
selopt.feather_radius);
|
||||
|
||||
/* Is selection all we need ? */
|
||||
if (selvals.painttype == PAINT_SELECTION_TYPE)
|
||||
return;
|
||||
|
||||
return_vals = gimp_run_procedure ("gimp_edit_stroke", &nreturn_vals,
|
||||
PARAM_DRAWABLE, gfig_drawable,
|
||||
PARAM_END);
|
||||
|
||||
gimp_destroy_params (return_vals, nreturn_vals);
|
||||
gimp_edit_stroke (gfig_drawable);
|
||||
|
||||
return_vals = gimp_run_procedure ("gimp_selection_clear", &nreturn_vals,
|
||||
PARAM_IMAGE, gfig_image,
|
||||
|
@ -8295,8 +8110,6 @@ d_paint_poly (Dobject *obj)
|
|||
/* first point center */
|
||||
/* Next point is radius */
|
||||
gdouble *line_pnts;
|
||||
GParam *return_vals = NULL;
|
||||
gint nreturn_vals;
|
||||
gint seg_count = 0;
|
||||
gint i = 0;
|
||||
DobjPoints * center_pnt;
|
||||
|
@ -8321,8 +8134,7 @@ d_paint_poly (Dobject *obj)
|
|||
if (!center_pnt || !seg_count || !center_pnt->next)
|
||||
return; /* no-line */
|
||||
|
||||
/* The second 2* to get around bug in GIMP */
|
||||
line_pnts = g_new0 (gdouble, GFIG_LCC*(2*seg_count + 1));
|
||||
line_pnts = g_new0 (gdouble, 2 * seg_count + 1);
|
||||
|
||||
/* Go around all the points drawing a line from one to the next */
|
||||
|
||||
|
@ -8387,64 +8199,20 @@ d_paint_poly (Dobject *obj)
|
|||
/* One go */
|
||||
if (selvals.painttype == PAINT_BRUSH_TYPE)
|
||||
{
|
||||
switch (selvals.brshtype)
|
||||
{
|
||||
case BRUSH_BRUSH_TYPE:
|
||||
return_vals = gimp_run_procedure ("gimp_paintbrush", &nreturn_vals,
|
||||
PARAM_DRAWABLE, gfig_drawable,
|
||||
PARAM_FLOAT, (gdouble)selvals.brushfade,
|
||||
PARAM_INT32, (i/2)*2*GFIG_LCC,/* GIMP BUG should be 2!!!!*/
|
||||
PARAM_FLOATARRAY, &line_pnts[0],
|
||||
PARAM_INT32, 0,
|
||||
PARAM_FLOAT, 0.0,
|
||||
PARAM_END);
|
||||
break;
|
||||
case BRUSH_PENCIL_TYPE:
|
||||
return_vals = gimp_run_procedure ("gimp_pencil", &nreturn_vals,
|
||||
PARAM_DRAWABLE, gfig_drawable,
|
||||
PARAM_INT32, (i/2)*2,
|
||||
PARAM_FLOATARRAY, &line_pnts[0],
|
||||
PARAM_END);
|
||||
break;
|
||||
case BRUSH_AIRBRUSH_TYPE:
|
||||
return_vals = gimp_run_procedure ("gimp_airbrush", &nreturn_vals,
|
||||
PARAM_DRAWABLE, gfig_drawable,
|
||||
PARAM_FLOAT, (gdouble)selvals.airbrushpressure,
|
||||
PARAM_INT32, (i/2)*2,
|
||||
PARAM_FLOATARRAY, &line_pnts[0],
|
||||
PARAM_END);
|
||||
break;
|
||||
case BRUSH_PATTERN_TYPE:
|
||||
return_vals = gimp_run_procedure ("gimp_clone", &nreturn_vals,
|
||||
PARAM_DRAWABLE, gfig_drawable,
|
||||
PARAM_DRAWABLE, gfig_drawable,
|
||||
PARAM_INT32, 1,
|
||||
PARAM_FLOAT, (gdouble)0.0,
|
||||
PARAM_FLOAT, (gdouble)0.0,
|
||||
PARAM_INT32, (i/2)*2,
|
||||
PARAM_FLOATARRAY, &line_pnts[0],
|
||||
PARAM_END);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
gfig_paint (selvals.brshtype,
|
||||
gfig_drawable,
|
||||
i, line_pnts);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* We want to do a selection */
|
||||
return_vals = gimp_run_procedure ("gimp_free_select", &nreturn_vals,
|
||||
PARAM_IMAGE, gfig_image,
|
||||
PARAM_INT32, (i/2)*2,
|
||||
PARAM_FLOATARRAY, &line_pnts[0],
|
||||
PARAM_INT32, selopt.type,
|
||||
PARAM_INT32, selopt.antia,
|
||||
PARAM_INT32, selopt.feather,
|
||||
PARAM_FLOAT, (gdouble)selopt.feather_radius,
|
||||
PARAM_END);
|
||||
gimp_free_select (gfig_image,
|
||||
i, line_pnts,
|
||||
selopt.type,
|
||||
selopt.antia,
|
||||
selopt.feather,
|
||||
selopt.feather_radius);
|
||||
}
|
||||
|
||||
gimp_destroy_params (return_vals, nreturn_vals);
|
||||
|
||||
g_free (line_pnts);
|
||||
}
|
||||
|
||||
|
@ -9301,8 +9069,6 @@ d_paint_arc (Dobject *obj)
|
|||
/* first point center */
|
||||
/* Next point is radius */
|
||||
gdouble *line_pnts;
|
||||
GParam *return_vals = NULL;
|
||||
gint nreturn_vals;
|
||||
gint seg_count = 0;
|
||||
gint i = 0;
|
||||
gdouble ang_grid;
|
||||
|
@ -9328,9 +9094,8 @@ d_paint_arc (Dobject *obj)
|
|||
|
||||
seg_count = 360; /* Should make a smoth-ish curve */
|
||||
|
||||
/* The second 2* to get around bug in GIMP */
|
||||
/* +3 because we MIGHT do pie selection */
|
||||
line_pnts = g_new0 (gdouble, GFIG_LCC*(2*seg_count + 3));
|
||||
line_pnts = g_new0 (gdouble, 2 * seg_count + 3);
|
||||
|
||||
/* Lines */
|
||||
ang_grid = 2*G_PI/(gdouble)360;
|
||||
|
@ -9384,47 +9149,9 @@ d_paint_arc (Dobject *obj)
|
|||
/* One go */
|
||||
if (selvals.painttype == PAINT_BRUSH_TYPE)
|
||||
{
|
||||
switch (selvals.brshtype)
|
||||
{
|
||||
case BRUSH_BRUSH_TYPE:
|
||||
return_vals = gimp_run_procedure ("gimp_paintbrush", &nreturn_vals,
|
||||
PARAM_DRAWABLE, gfig_drawable,
|
||||
PARAM_FLOAT, (gdouble)selvals.brushfade,
|
||||
PARAM_INT32, (i/2)*2*GFIG_LCC,/* GIMP BUG should be 2!!!!*/
|
||||
PARAM_FLOATARRAY, &line_pnts[0],
|
||||
PARAM_INT32, 0,
|
||||
PARAM_FLOAT, 0.0,
|
||||
PARAM_END);
|
||||
break;
|
||||
case BRUSH_PENCIL_TYPE:
|
||||
return_vals = gimp_run_procedure ("gimp_pencil", &nreturn_vals,
|
||||
PARAM_DRAWABLE, gfig_drawable,
|
||||
PARAM_INT32, (i/2)*2,
|
||||
PARAM_FLOATARRAY, &line_pnts[0],
|
||||
PARAM_END);
|
||||
break;
|
||||
case BRUSH_AIRBRUSH_TYPE:
|
||||
return_vals = gimp_run_procedure ("gimp_airbrush", &nreturn_vals,
|
||||
PARAM_DRAWABLE, gfig_drawable,
|
||||
PARAM_FLOAT, (gdouble)selvals.airbrushpressure,
|
||||
PARAM_INT32, (i/2)*2,
|
||||
PARAM_FLOATARRAY, &line_pnts[0],
|
||||
PARAM_END);
|
||||
break;
|
||||
case BRUSH_PATTERN_TYPE:
|
||||
return_vals = gimp_run_procedure ("gimp_clone", &nreturn_vals,
|
||||
PARAM_DRAWABLE, gfig_drawable,
|
||||
PARAM_DRAWABLE, gfig_drawable,
|
||||
PARAM_INT32, 1,
|
||||
PARAM_FLOAT, (gdouble)0.0,
|
||||
PARAM_FLOAT, (gdouble)0.0,
|
||||
PARAM_INT32, (i/2)*2,
|
||||
PARAM_FLOATARRAY, &line_pnts[0],
|
||||
PARAM_END);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
gfig_paint (selvals.brshtype,
|
||||
gfig_drawable,
|
||||
i, line_pnts);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -9435,20 +9162,14 @@ d_paint_arc (Dobject *obj)
|
|||
line_pnts[i++] = center_pnt.y;
|
||||
}
|
||||
|
||||
/* We want to do a selection */
|
||||
return_vals = gimp_run_procedure ("gimp_free_select", &nreturn_vals,
|
||||
PARAM_IMAGE, gfig_image,
|
||||
PARAM_INT32, (i/2)*2,
|
||||
PARAM_FLOATARRAY, &line_pnts[0],
|
||||
PARAM_INT32, selopt.type,
|
||||
PARAM_INT32, selopt.antia,
|
||||
PARAM_INT32, selopt.feather,
|
||||
PARAM_FLOAT, (gdouble)selopt.feather_radius,
|
||||
PARAM_END);
|
||||
gimp_free_select (gfig_image,
|
||||
i, line_pnts,
|
||||
selopt.type,
|
||||
selopt.antia,
|
||||
selopt.feather,
|
||||
selopt.feather_radius);
|
||||
}
|
||||
|
||||
gimp_destroy_params (return_vals, nreturn_vals);
|
||||
|
||||
g_free (line_pnts);
|
||||
}
|
||||
|
||||
|
@ -9836,8 +9557,6 @@ d_paint_star (Dobject *obj)
|
|||
/* first point center */
|
||||
/* Next point is radius */
|
||||
gdouble *line_pnts;
|
||||
GParam *return_vals = NULL;
|
||||
gint nreturn_vals;
|
||||
gint seg_count = 0;
|
||||
gint i = 0;
|
||||
DobjPoints * center_pnt;
|
||||
|
@ -9865,8 +9584,7 @@ d_paint_star (Dobject *obj)
|
|||
if (!center_pnt || !seg_count)
|
||||
return; /* no-line */
|
||||
|
||||
/* The second 2* to get around bug in GIMP */
|
||||
line_pnts = g_new0 (gdouble, GFIG_LCC * (2 * seg_count + 1));
|
||||
line_pnts = g_new0 (gdouble, 2 * seg_count + 1);
|
||||
|
||||
/* Go around all the points drawing a line from one to the next */
|
||||
/* Next point defines the radius */
|
||||
|
@ -9958,69 +9676,23 @@ d_paint_star (Dobject *obj)
|
|||
else
|
||||
scale_to_xy (&line_pnts[0], i/2);
|
||||
|
||||
/* One go */
|
||||
/* One go */
|
||||
if (selvals.painttype == PAINT_BRUSH_TYPE)
|
||||
{
|
||||
switch (selvals.brshtype)
|
||||
{
|
||||
case BRUSH_BRUSH_TYPE:
|
||||
return_vals = gimp_run_procedure ("gimp_paintbrush", &nreturn_vals,
|
||||
PARAM_DRAWABLE, gfig_drawable,
|
||||
PARAM_FLOAT, (gdouble)selvals.brushfade,
|
||||
PARAM_INT32, (i/2)*2*GFIG_LCC,/* GIMP BUG should be 2!!!!*/
|
||||
PARAM_FLOATARRAY, &line_pnts[0],
|
||||
PARAM_INT32, 0,
|
||||
PARAM_FLOAT, 0.0,
|
||||
PARAM_END);
|
||||
break;
|
||||
case BRUSH_PENCIL_TYPE:
|
||||
return_vals = gimp_run_procedure ("gimp_pencil", &nreturn_vals,
|
||||
PARAM_DRAWABLE, gfig_drawable,
|
||||
PARAM_INT32, (i/2)*2,
|
||||
PARAM_FLOATARRAY, &line_pnts[0],
|
||||
PARAM_END);
|
||||
break;
|
||||
case BRUSH_AIRBRUSH_TYPE:
|
||||
return_vals = gimp_run_procedure ("gimp_airbrush", &nreturn_vals,
|
||||
PARAM_DRAWABLE, gfig_drawable,
|
||||
PARAM_FLOAT, (gdouble)selvals.airbrushpressure,
|
||||
PARAM_INT32, (i/2)*2,
|
||||
PARAM_FLOATARRAY, &line_pnts[0],
|
||||
PARAM_END);
|
||||
break;
|
||||
case BRUSH_PATTERN_TYPE:
|
||||
return_vals = gimp_run_procedure ("gimp_clone", &nreturn_vals,
|
||||
PARAM_DRAWABLE, gfig_drawable,
|
||||
PARAM_DRAWABLE, gfig_drawable,
|
||||
PARAM_INT32, 1,
|
||||
PARAM_FLOAT, (gdouble)0.0,
|
||||
PARAM_FLOAT, (gdouble)0.0,
|
||||
PARAM_INT32, (i/2)*2,
|
||||
PARAM_FLOATARRAY, &line_pnts[0],
|
||||
PARAM_END);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
gfig_paint (selvals.brshtype,
|
||||
gfig_drawable,
|
||||
i, line_pnts);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* We want to do a selection */
|
||||
return_vals = gimp_run_procedure ("gimp_free_select", &nreturn_vals,
|
||||
PARAM_IMAGE, gfig_image,
|
||||
PARAM_INT32, (i/2)*2,
|
||||
PARAM_FLOATARRAY, &line_pnts[0],
|
||||
PARAM_INT32, selopt.type,
|
||||
PARAM_INT32, selopt.antia,
|
||||
PARAM_INT32, selopt.feather,
|
||||
PARAM_FLOAT, (gdouble)selopt.feather_radius,
|
||||
PARAM_END);
|
||||
|
||||
gimp_free_select (gfig_image,
|
||||
i, line_pnts,
|
||||
selopt.type,
|
||||
selopt.antia,
|
||||
selopt.feather,
|
||||
selopt.feather_radius);
|
||||
}
|
||||
|
||||
gimp_destroy_params (return_vals, nreturn_vals);
|
||||
|
||||
g_free (line_pnts);
|
||||
}
|
||||
|
||||
|
@ -10379,8 +10051,6 @@ d_paint_spiral (Dobject *obj)
|
|||
/* first point center */
|
||||
/* Next point is radius */
|
||||
gdouble *line_pnts;
|
||||
GParam *return_vals = NULL;
|
||||
gint nreturn_vals;
|
||||
gint seg_count = 0;
|
||||
gint i = 0;
|
||||
DobjPoints * center_pnt;
|
||||
|
@ -10428,8 +10098,7 @@ d_paint_spiral (Dobject *obj)
|
|||
/* count - */
|
||||
seg_count = abs ((gint) (obj->type_data)*180) + clock_wise*(gint)RINT (offset_angle/ang_grid);
|
||||
|
||||
/* The second 2* to get around bug in GIMP */
|
||||
line_pnts = g_new0 (gdouble, GFIG_LCC*(2*seg_count + 3));
|
||||
line_pnts = g_new0 (gdouble, 2 * seg_count + 3);
|
||||
|
||||
for (loop = 0 ; loop <= seg_count; loop++)
|
||||
{
|
||||
|
@ -10467,69 +10136,23 @@ d_paint_spiral (Dobject *obj)
|
|||
else
|
||||
scale_to_xy (&line_pnts[0], i/2);
|
||||
|
||||
/* One go */
|
||||
/* One go */
|
||||
if (selvals.painttype == PAINT_BRUSH_TYPE)
|
||||
{
|
||||
switch (selvals.brshtype)
|
||||
{
|
||||
case BRUSH_BRUSH_TYPE:
|
||||
return_vals = gimp_run_procedure ("gimp_paintbrush", &nreturn_vals,
|
||||
PARAM_DRAWABLE, gfig_drawable,
|
||||
PARAM_FLOAT, (gdouble)selvals.brushfade,
|
||||
PARAM_INT32, (i/2)*2*GFIG_LCC,/* GIMP BUG should be 2!!!!*/
|
||||
PARAM_FLOATARRAY, &line_pnts[0],
|
||||
PARAM_INT32, 0,
|
||||
PARAM_FLOAT, 0.0,
|
||||
PARAM_END);
|
||||
break;
|
||||
case BRUSH_PENCIL_TYPE:
|
||||
return_vals = gimp_run_procedure ("gimp_pencil", &nreturn_vals,
|
||||
PARAM_DRAWABLE, gfig_drawable,
|
||||
PARAM_INT32, (i/2)*2,
|
||||
PARAM_FLOATARRAY, &line_pnts[0],
|
||||
PARAM_END);
|
||||
break;
|
||||
case BRUSH_AIRBRUSH_TYPE:
|
||||
return_vals = gimp_run_procedure ("gimp_airbrush", &nreturn_vals,
|
||||
PARAM_DRAWABLE, gfig_drawable,
|
||||
PARAM_FLOAT, (gdouble)selvals.airbrushpressure,
|
||||
PARAM_INT32, (i/2)*2,
|
||||
PARAM_FLOATARRAY, &line_pnts[0],
|
||||
PARAM_END);
|
||||
break;
|
||||
case BRUSH_PATTERN_TYPE:
|
||||
return_vals = gimp_run_procedure ("gimp_clone", &nreturn_vals,
|
||||
PARAM_DRAWABLE, gfig_drawable,
|
||||
PARAM_DRAWABLE, gfig_drawable,
|
||||
PARAM_INT32, 1,
|
||||
PARAM_FLOAT, (gdouble)0.0,
|
||||
PARAM_FLOAT, (gdouble)0.0,
|
||||
PARAM_INT32, (i/2)*2,
|
||||
PARAM_FLOATARRAY, &line_pnts[0],
|
||||
PARAM_END);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
gfig_paint (selvals.brshtype,
|
||||
gfig_drawable,
|
||||
i, line_pnts);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* We want to do a selection */
|
||||
return_vals = gimp_run_procedure ("gimp_free_select", &nreturn_vals,
|
||||
PARAM_IMAGE, gfig_image,
|
||||
PARAM_INT32, (i/2)*2,
|
||||
PARAM_FLOATARRAY, &line_pnts[0],
|
||||
PARAM_INT32, selopt.type,
|
||||
PARAM_INT32, selopt.antia,
|
||||
PARAM_INT32, selopt.feather,
|
||||
PARAM_FLOAT, (gdouble)selopt.feather_radius,
|
||||
PARAM_END);
|
||||
|
||||
gimp_free_select (gfig_image,
|
||||
i, line_pnts,
|
||||
selopt.type,
|
||||
selopt.antia,
|
||||
selopt.feather,
|
||||
selopt.feather_radius);
|
||||
}
|
||||
|
||||
gimp_destroy_params (return_vals, nreturn_vals);
|
||||
|
||||
g_free (line_pnts);
|
||||
}
|
||||
|
||||
|
@ -10930,8 +10553,7 @@ d_draw_bezier (Dobject *obj)
|
|||
if (!spnt || !seg_count)
|
||||
return; /* no-line */
|
||||
|
||||
/* The second *2 to get around bug in GIMP */
|
||||
line_pnts = (fp_pnt) g_new0 (gdouble, GFIG_LCC * (2 * seg_count + 1));
|
||||
line_pnts = (fp_pnt) g_new0 (gdouble, 2 * seg_count + 1);
|
||||
|
||||
/* Go around all the points drawing a line from one to the next */
|
||||
while (spnt)
|
||||
|
@ -10967,8 +10589,6 @@ d_paint_bezier (Dobject *obj)
|
|||
DobjPoints *spnt;
|
||||
gint seg_count = 0;
|
||||
|
||||
GParam *return_vals = NULL;
|
||||
gint nreturn_vals;
|
||||
gint i = 0;
|
||||
|
||||
spnt = obj->points;
|
||||
|
@ -10987,8 +10607,7 @@ d_paint_bezier (Dobject *obj)
|
|||
if (!spnt || !seg_count)
|
||||
return; /* no-line */
|
||||
|
||||
/* The second *2 to get around bug in GIMP */
|
||||
bz_line_pnts = (fp_pnt) g_new0 (gdouble, GFIG_LCC * (2 * seg_count + 1));
|
||||
bz_line_pnts = (fp_pnt) g_new0 (gdouble, 2 * seg_count + 1);
|
||||
|
||||
/* Go around all the points drawing a line from one to the next */
|
||||
while (spnt)
|
||||
|
@ -11012,66 +10631,23 @@ d_paint_bezier (Dobject *obj)
|
|||
else
|
||||
scale_to_xy (&line_pnts[0], i / 2);
|
||||
|
||||
/* One go */
|
||||
if (selvals.painttype == PAINT_BRUSH_TYPE)
|
||||
{
|
||||
switch (selvals.brshtype)
|
||||
{
|
||||
case BRUSH_BRUSH_TYPE:
|
||||
return_vals = gimp_run_procedure ("gimp_paintbrush", &nreturn_vals,
|
||||
PARAM_DRAWABLE, gfig_drawable,
|
||||
PARAM_FLOAT, (gdouble)selvals.brushfade,
|
||||
PARAM_INT32, (i/2)*2*GFIG_LCC,/* GIMP BUG should be 2!!!!*/
|
||||
PARAM_FLOATARRAY, &line_pnts[0],
|
||||
PARAM_INT32, 0,
|
||||
PARAM_FLOAT, 0.0,
|
||||
PARAM_END);
|
||||
break;
|
||||
case BRUSH_PENCIL_TYPE:
|
||||
return_vals = gimp_run_procedure ("gimp_pencil", &nreturn_vals,
|
||||
PARAM_DRAWABLE, gfig_drawable,
|
||||
PARAM_INT32, (i/2)*2,
|
||||
PARAM_FLOATARRAY, &line_pnts[0],
|
||||
PARAM_END);
|
||||
break;
|
||||
case BRUSH_AIRBRUSH_TYPE:
|
||||
return_vals = gimp_run_procedure ("gimp_airbrush", &nreturn_vals,
|
||||
PARAM_DRAWABLE, gfig_drawable,
|
||||
PARAM_FLOAT, (gdouble)selvals.airbrushpressure,
|
||||
PARAM_INT32, (i/2)*2,
|
||||
PARAM_FLOATARRAY, &line_pnts[0],
|
||||
PARAM_END);
|
||||
break;
|
||||
case BRUSH_PATTERN_TYPE:
|
||||
return_vals = gimp_run_procedure ("gimp_clone", &nreturn_vals,
|
||||
PARAM_DRAWABLE, gfig_drawable,
|
||||
PARAM_DRAWABLE, gfig_drawable,
|
||||
PARAM_INT32, 1,
|
||||
PARAM_FLOAT, (gdouble)0.0,
|
||||
PARAM_FLOAT, (gdouble)0.0,
|
||||
PARAM_INT32, (i/2)*2,
|
||||
PARAM_FLOATARRAY, &line_pnts[0],
|
||||
PARAM_END);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
gfig_paint (selvals.brshtype,
|
||||
gfig_drawable,
|
||||
i, line_pnts);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* We want to do a selection */
|
||||
return_vals = gimp_run_procedure ("gimp_free_select", &nreturn_vals,
|
||||
PARAM_IMAGE, gfig_image,
|
||||
PARAM_INT32, (i/2)*2,
|
||||
PARAM_FLOATARRAY, &line_pnts[0],
|
||||
PARAM_INT32, selopt.type,
|
||||
PARAM_INT32, selopt.antia,
|
||||
PARAM_INT32, selopt.feather,
|
||||
PARAM_FLOAT, (gdouble)selopt.feather_radius,
|
||||
PARAM_END);
|
||||
gimp_free_select (gfig_image,
|
||||
i, line_pnts,
|
||||
selopt.type,
|
||||
selopt.antia,
|
||||
selopt.feather,
|
||||
selopt.feather_radius);
|
||||
}
|
||||
|
||||
gimp_destroy_params (return_vals, nreturn_vals);
|
||||
|
||||
g_free (bz_line_pnts);
|
||||
/* Don't free line_pnts - may need again */
|
||||
}
|
||||
|
|
|
@ -479,7 +479,7 @@ gimp_create_main_window (void)
|
|||
scaling_adjustment =
|
||||
gimp_scale_entry_new (GTK_TABLE (table), 0, 0,
|
||||
_("Scaling:"), 200, 0,
|
||||
-vars.scaling, 36.0, 1201.0, 1.0, 10.0, 1,
|
||||
-vars.scaling, 36.0, 1200.0, 1.0, 10.0, 1,
|
||||
TRUE, 0, 0,
|
||||
NULL, NULL);
|
||||
}
|
||||
|
@ -771,7 +771,7 @@ gimp_scaling_callback (GtkWidget *widget)
|
|||
gimp_image_get_resolution (image_ID, &xres, &yres);
|
||||
|
||||
GTK_ADJUSTMENT (scaling_adjustment)->lower = 36.0;
|
||||
GTK_ADJUSTMENT (scaling_adjustment)->upper = 1201.0;
|
||||
GTK_ADJUSTMENT (scaling_adjustment)->upper = 1200.0;
|
||||
GTK_ADJUSTMENT (scaling_adjustment)->value = yres;
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (scaling_ppi), TRUE);
|
||||
vars.scaling = 0.0;
|
||||
|
@ -875,7 +875,7 @@ gimp_do_misc_updates (void)
|
|||
plist[plist_current].v.scaling = -plist[plist_current].v.scaling;
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (scaling_ppi), TRUE);
|
||||
GTK_ADJUSTMENT (scaling_adjustment)->lower = 36.0;
|
||||
GTK_ADJUSTMENT (scaling_adjustment)->upper = 1201.0;
|
||||
GTK_ADJUSTMENT (scaling_adjustment)->upper = 1200.0;
|
||||
GTK_ADJUSTMENT (scaling_adjustment)->value = tmp;
|
||||
gtk_signal_emit_by_name (scaling_adjustment, "changed");
|
||||
gtk_signal_emit_by_name (scaling_adjustment, "value_changed");
|
||||
|
@ -885,7 +885,7 @@ gimp_do_misc_updates (void)
|
|||
float tmp = plist[plist_current].v.scaling;
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (scaling_percent), TRUE);
|
||||
GTK_ADJUSTMENT (scaling_adjustment)->lower = 5.0;
|
||||
GTK_ADJUSTMENT (scaling_adjustment)->upper = 101.0;
|
||||
GTK_ADJUSTMENT (scaling_adjustment)->upper = 100.0;
|
||||
GTK_ADJUSTMENT (scaling_adjustment)->value = tmp;
|
||||
gtk_signal_emit_by_name (scaling_adjustment, "changed");
|
||||
gtk_signal_emit_by_name (scaling_adjustment, "value_changed");
|
||||
|
|
|
@ -973,7 +973,10 @@ get_system_printers (void)
|
|||
char defname[17];
|
||||
#if defined(LPC_COMMAND) || defined(LPSTAT_COMMAND)
|
||||
FILE *pfile;
|
||||
char line[129], name[17];
|
||||
char line[129];
|
||||
#endif
|
||||
#if defined(LPSTAT_COMMAND)
|
||||
char name[17];
|
||||
#endif
|
||||
#ifdef __EMX__
|
||||
BYTE pnum;
|
||||
|
|
|
@ -67,8 +67,6 @@ static void run (gchar *name,
|
|||
static gint sel2path_dialog (SELVALS *sels);
|
||||
static void sel2path_ok_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
static void sel2path_close_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
static void sel2path_reset_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
static void dialog_print_selVals (SELVALS *sels);
|
||||
|
|
Loading…
Reference in New Issue