static GValueArray * channel_set_opacity_invoker (GimpProcedure *procedure, Gimp *gimp, GimpContext *context, GimpProgress *progress, const GValueArray *args) { gboolean success = TRUE; GimpChannel *channel; gdouble opacity; channel = gimp_value_get_channel (&args->values[0], gimp); opacity = g_value_get_double (&args->values[1]); if (success) { gimp_channel_set_opacity (channel, opacity / 100.0, TRUE); } return gimp_procedure_get_return_values (procedure, success); }
static GimpValueArray * channel_set_opacity_invoker (GimpProcedure *procedure, Gimp *gimp, GimpContext *context, GimpProgress *progress, const GimpValueArray *args, GError **error) { gboolean success = TRUE; GimpChannel *channel; gdouble opacity; channel = gimp_value_get_channel (gimp_value_array_index (args, 0), gimp); opacity = g_value_get_double (gimp_value_array_index (args, 1)); if (success) { gimp_channel_set_opacity (channel, opacity / 100.0, TRUE); } return gimp_procedure_get_return_values (procedure, success, error ? *error : NULL); }