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