2000-06-01 05:16:11 +08:00
|
|
|
/* LIBGIMP - The GIMP Library
|
|
|
|
* Copyright (C) 1995-2000 Peter Mattis and Spencer Kimball
|
|
|
|
*
|
|
|
|
* gimpbrushes_pdb.c
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the
|
|
|
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
|
|
* Boston, MA 02111-1307, USA.
|
|
|
|
*/
|
|
|
|
|
2000-08-22 02:59:12 +08:00
|
|
|
/* NOTE: This file is autogenerated by pdbgen.pl */
|
|
|
|
|
2000-06-01 05:16:11 +08:00
|
|
|
#include "gimp.h"
|
|
|
|
|
|
|
|
gchar *
|
2000-08-22 02:59:12 +08:00
|
|
|
gimp_brushes_get_brush_data (gchar *name,
|
2000-06-01 05:16:11 +08:00
|
|
|
gdouble *opacity,
|
|
|
|
gint *spacing,
|
|
|
|
GimpLayerModeEffects *paint_mode,
|
|
|
|
gint *width,
|
|
|
|
gint *height,
|
2000-08-22 02:59:12 +08:00
|
|
|
gint *length,
|
2000-06-01 05:16:11 +08:00
|
|
|
guint8 **mask_data)
|
|
|
|
{
|
2000-08-03 09:35:28 +08:00
|
|
|
GimpParam *return_vals;
|
2000-06-01 05:16:11 +08:00
|
|
|
gint nreturn_vals;
|
2000-08-22 02:59:12 +08:00
|
|
|
gchar *ret_name = NULL;
|
2000-06-01 05:16:11 +08:00
|
|
|
|
|
|
|
return_vals = gimp_run_procedure ("gimp_brushes_get_brush_data",
|
|
|
|
&nreturn_vals,
|
2000-08-22 02:59:12 +08:00
|
|
|
GIMP_PDB_STRING, name,
|
2000-08-03 09:35:28 +08:00
|
|
|
GIMP_PDB_END);
|
2000-06-01 05:16:11 +08:00
|
|
|
|
2000-08-22 02:59:12 +08:00
|
|
|
*length = 0;
|
|
|
|
|
2000-08-03 09:35:28 +08:00
|
|
|
if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
|
2000-06-01 05:16:11 +08:00
|
|
|
{
|
2000-08-22 02:59:12 +08:00
|
|
|
ret_name = g_strdup (return_vals[1].data.d_string);
|
2000-06-01 05:16:11 +08:00
|
|
|
*opacity = return_vals[2].data.d_float;
|
|
|
|
*spacing = return_vals[3].data.d_int32;
|
|
|
|
*paint_mode = return_vals[4].data.d_int32;
|
|
|
|
*width = return_vals[5].data.d_int32;
|
|
|
|
*height = return_vals[6].data.d_int32;
|
2000-08-22 02:59:12 +08:00
|
|
|
*length = return_vals[7].data.d_int32;
|
|
|
|
*mask_data = g_new (guint8, *length);
|
2000-06-01 05:16:11 +08:00
|
|
|
memcpy (*mask_data, return_vals[8].data.d_int8array,
|
2000-08-22 02:59:12 +08:00
|
|
|
*length * sizeof (guint8));
|
2000-06-01 05:16:11 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
gimp_destroy_params (return_vals, nreturn_vals);
|
|
|
|
|
2000-08-22 02:59:12 +08:00
|
|
|
return ret_name;
|
2000-06-01 05:16:11 +08:00
|
|
|
}
|