2006-12-10 05:33:38 +08:00
/* GIMP - The GNU Image Manipulation Program
2004-09-29 06:01:21 +08:00
* Copyright ( C ) 1995 - 2003 Spencer Kimball and Peter Mattis
*
2009-01-18 06:28:01 +08:00
* This program is free software : you can redistribute it and / or modify
2004-09-29 06:01:21 +08:00
* it under the terms of the GNU General Public License as published by
2009-01-18 06:28:01 +08:00
* the Free Software Foundation ; either version 3 of the License , or
2004-09-29 06:01:21 +08:00
* ( at your option ) any later version .
*
* This program 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 General Public License for more details .
*
* You should have received a copy of the GNU General Public License
2009-01-18 06:28:01 +08:00
* along with this program . If not , see < http : //www.gnu.org/licenses/>.
2004-09-29 06:01:21 +08:00
*/
2007-01-09 18:52:47 +08:00
/* NOTE: This file is auto-generated by pdbgen.pl. */
2004-09-29 06:01:21 +08:00
# include "config.h"
# include <string.h>
2008-10-10 04:24:04 +08:00
# include <gegl.h>
2004-09-29 06:01:21 +08:00
2012-05-03 09:36:22 +08:00
# include <gdk-pixbuf/gdk-pixbuf.h>
2012-05-04 06:50:23 +08:00
# include "libgimpbase/gimpbase.h"
2004-09-29 06:01:21 +08:00
# include "pdb-types.h"
# include "core/gimp.h"
# include "core/gimpbrush.h"
2004-12-31 07:28:38 +08:00
# include "core/gimpbrushgenerated.h"
2004-09-29 06:01:21 +08:00
# include "core/gimpcontext.h"
# include "core/gimpdatafactory.h"
2008-02-08 01:08:54 +08:00
# include "core/gimpparamspecs.h"
2012-04-09 06:59:20 +08:00
# include "core/gimptempbuf.h"
2004-09-29 06:01:21 +08:00
2008-02-08 01:08:54 +08:00
# include "gimppdb.h"
# include "gimppdb-utils.h"
# include "gimpprocedure.h"
2008-04-04 19:15:55 +08:00
# include "internal-procs.h"
2006-11-01 03:02:56 +08:00
2004-09-29 06:01:21 +08:00
2012-05-04 06:50:23 +08:00
static GimpValueArray *
2012-05-29 01:55:28 +08:00
brush_new_invoker ( GimpProcedure * procedure ,
2012-05-04 06:50:23 +08:00
Gimp * gimp ,
GimpContext * context ,
GimpProgress * progress ,
const GimpValueArray * args ,
GError * * error )
2004-09-29 06:01:21 +08:00
{
gboolean success = TRUE ;
2012-05-04 06:50:23 +08:00
GimpValueArray * return_vals ;
2006-04-03 00:03:32 +08:00
const gchar * name ;
2006-03-15 20:49:25 +08:00
gchar * actual_name = NULL ;
2004-09-29 06:01:21 +08:00
2012-05-04 06:50:23 +08:00
name = g_value_get_string ( gimp_value_array_index ( args , 0 ) ) ;
2004-09-29 06:01:21 +08:00
if ( success )
{
2010-04-05 19:24:54 +08:00
GimpData * data = gimp_data_factory_data_new ( gimp - > brush_factory ,
2010-04-11 01:55:42 +08:00
context , name ) ;
2004-10-04 17:39:27 +08:00
2007-04-25 22:23:05 +08:00
if ( data )
2009-09-01 04:47:18 +08:00
actual_name = g_strdup ( gimp_object_get_name ( data ) ) ;
2006-03-15 20:49:25 +08:00
else
success = FALSE ;
2004-09-29 06:01:21 +08:00
}
2008-08-16 21:57:57 +08:00
return_vals = gimp_procedure_get_return_values ( procedure , success ,
error ? * error : NULL ) ;
2004-09-29 06:01:21 +08:00
if ( success )
2012-05-04 06:50:23 +08:00
g_value_take_string ( gimp_value_array_index ( return_vals , 1 ) , actual_name ) ;
2004-09-29 06:01:21 +08:00
2006-03-28 05:09:32 +08:00
return return_vals ;
2004-09-29 06:01:21 +08:00
}
2012-05-04 06:50:23 +08:00
static GimpValueArray *
2012-05-29 01:55:28 +08:00
brush_duplicate_invoker ( GimpProcedure * procedure ,
2012-05-04 06:50:23 +08:00
Gimp * gimp ,
GimpContext * context ,
GimpProgress * progress ,
const GimpValueArray * args ,
GError * * error )
2004-09-29 06:01:21 +08:00
{
gboolean success = TRUE ;
2012-05-04 06:50:23 +08:00
GimpValueArray * return_vals ;
2006-04-03 00:03:32 +08:00
const gchar * name ;
2006-03-15 20:49:25 +08:00
gchar * copy_name = NULL ;
2004-09-29 06:01:21 +08:00
2012-05-04 06:50:23 +08:00
name = g_value_get_string ( gimp_value_array_index ( args , 0 ) ) ;
2004-09-29 06:01:21 +08:00
if ( success )
{
2007-12-11 17:54:41 +08:00
GimpBrush * brush = gimp_pdb_get_brush ( gimp , name , FALSE , error ) ;
2004-09-29 06:01:21 +08:00
if ( brush )
{
2006-03-15 20:49:25 +08:00
GimpBrush * brush_copy = ( GimpBrush * )
2004-09-29 06:01:21 +08:00
gimp_data_factory_data_duplicate ( gimp - > brush_factory ,
GIMP_DATA ( brush ) ) ;
2006-03-15 20:49:25 +08:00
if ( brush_copy )
2009-09-01 04:47:18 +08:00
copy_name = g_strdup ( gimp_object_get_name ( brush_copy ) ) ;
2006-03-15 20:49:25 +08:00
else
success = FALSE ;
2004-09-29 06:01:21 +08:00
}
else
success = FALSE ;
}
2008-08-16 21:57:57 +08:00
return_vals = gimp_procedure_get_return_values ( procedure , success ,
error ? * error : NULL ) ;
2004-09-29 06:01:21 +08:00
if ( success )
2012-05-04 06:50:23 +08:00
g_value_take_string ( gimp_value_array_index ( return_vals , 1 ) , copy_name ) ;
2004-09-29 06:01:21 +08:00
2006-03-28 05:09:32 +08:00
return return_vals ;
2004-09-29 06:01:21 +08:00
}
2012-05-04 06:50:23 +08:00
static GimpValueArray *
2012-05-29 01:55:28 +08:00
brush_is_generated_invoker ( GimpProcedure * procedure ,
2012-05-04 06:50:23 +08:00
Gimp * gimp ,
GimpContext * context ,
GimpProgress * progress ,
const GimpValueArray * args ,
GError * * error )
2004-12-31 07:28:38 +08:00
{
gboolean success = TRUE ;
2012-05-04 06:50:23 +08:00
GimpValueArray * return_vals ;
2006-04-03 00:03:32 +08:00
const gchar * name ;
2006-03-15 20:49:25 +08:00
gboolean generated = FALSE ;
2004-12-31 07:28:38 +08:00
2012-05-04 06:50:23 +08:00
name = g_value_get_string ( gimp_value_array_index ( args , 0 ) ) ;
2004-12-31 07:28:38 +08:00
if ( success )
{
2007-12-11 17:54:41 +08:00
GimpBrush * brush = gimp_pdb_get_brush ( gimp , name , FALSE , error ) ;
2004-12-31 07:28:38 +08:00
if ( brush )
2006-03-15 20:49:25 +08:00
generated = GIMP_IS_BRUSH_GENERATED ( brush ) ;
2004-12-31 07:28:38 +08:00
else
success = FALSE ;
}
2008-08-16 21:57:57 +08:00
return_vals = gimp_procedure_get_return_values ( procedure , success ,
error ? * error : NULL ) ;
2004-12-31 07:28:38 +08:00
if ( success )
2012-05-04 06:50:23 +08:00
g_value_set_boolean ( gimp_value_array_index ( return_vals , 1 ) , generated ) ;
2004-12-31 07:28:38 +08:00
2006-03-28 05:09:32 +08:00
return return_vals ;
2004-12-31 07:28:38 +08:00
}
2012-05-04 06:50:23 +08:00
static GimpValueArray *
2012-05-29 01:55:28 +08:00
brush_rename_invoker ( GimpProcedure * procedure ,
2012-05-04 06:50:23 +08:00
Gimp * gimp ,
GimpContext * context ,
GimpProgress * progress ,
const GimpValueArray * args ,
GError * * error )
2004-09-29 06:01:21 +08:00
{
gboolean success = TRUE ;
2012-05-04 06:50:23 +08:00
GimpValueArray * return_vals ;
2006-04-03 00:03:32 +08:00
const gchar * name ;
const gchar * new_name ;
2006-03-15 20:49:25 +08:00
gchar * actual_name = NULL ;
2004-09-29 06:01:21 +08:00
2012-05-04 06:50:23 +08:00
name = g_value_get_string ( gimp_value_array_index ( args , 0 ) ) ;
new_name = g_value_get_string ( gimp_value_array_index ( args , 1 ) ) ;
2004-09-29 06:01:21 +08:00
if ( success )
{
2007-12-11 17:54:41 +08:00
GimpBrush * brush = gimp_pdb_get_brush ( gimp , name , TRUE , error ) ;
2004-09-29 06:01:21 +08:00
2007-12-11 17:54:41 +08:00
if ( brush )
2006-03-15 20:49:25 +08:00
{
gimp_object_set_name ( GIMP_OBJECT ( brush ) , new_name ) ;
2009-09-01 04:47:18 +08:00
actual_name = g_strdup ( gimp_object_get_name ( brush ) ) ;
2006-03-15 20:49:25 +08:00
}
2004-09-29 06:01:21 +08:00
else
success = FALSE ;
}
2008-08-16 21:57:57 +08:00
return_vals = gimp_procedure_get_return_values ( procedure , success ,
error ? * error : NULL ) ;
2004-09-29 06:01:21 +08:00
if ( success )
2012-05-04 06:50:23 +08:00
g_value_take_string ( gimp_value_array_index ( return_vals , 1 ) , actual_name ) ;
2004-09-29 06:01:21 +08:00
2006-03-28 05:09:32 +08:00
return return_vals ;
2004-09-29 06:01:21 +08:00
}
2012-05-04 06:50:23 +08:00
static GimpValueArray *
2012-05-29 01:55:28 +08:00
brush_delete_invoker ( GimpProcedure * procedure ,
2012-05-04 06:50:23 +08:00
Gimp * gimp ,
GimpContext * context ,
GimpProgress * progress ,
const GimpValueArray * args ,
GError * * error )
2004-09-29 06:01:21 +08:00
{
gboolean success = TRUE ;
2006-04-03 00:03:32 +08:00
const gchar * name ;
2004-09-29 06:01:21 +08:00
2012-05-04 06:50:23 +08:00
name = g_value_get_string ( gimp_value_array_index ( args , 0 ) ) ;
2004-09-29 06:01:21 +08:00
if ( success )
{
2007-12-11 17:54:41 +08:00
GimpBrush * brush = gimp_pdb_get_brush ( gimp , name , FALSE , error ) ;
2004-09-29 06:01:21 +08:00
2009-11-01 01:48:38 +08:00
if ( brush & & gimp_data_is_deletable ( GIMP_DATA ( brush ) ) )
2007-12-05 03:01:06 +08:00
success = gimp_data_factory_data_delete ( gimp - > brush_factory ,
GIMP_DATA ( brush ) ,
TRUE , error ) ;
2004-09-29 06:01:21 +08:00
else
success = FALSE ;
}
2008-08-16 21:57:57 +08:00
return gimp_procedure_get_return_values ( procedure , success ,
error ? * error : NULL ) ;
2004-09-29 06:01:21 +08:00
}
2012-05-04 06:50:23 +08:00
static GimpValueArray *
2012-05-29 01:55:28 +08:00
brush_is_editable_invoker ( GimpProcedure * procedure ,
2012-05-04 06:50:23 +08:00
Gimp * gimp ,
GimpContext * context ,
GimpProgress * progress ,
const GimpValueArray * args ,
GError * * error )
2004-12-31 07:28:38 +08:00
{
gboolean success = TRUE ;
2012-05-04 06:50:23 +08:00
GimpValueArray * return_vals ;
2006-04-03 00:03:32 +08:00
const gchar * name ;
2006-03-15 20:49:25 +08:00
gboolean editable = FALSE ;
2004-12-31 07:28:38 +08:00
2012-05-04 06:50:23 +08:00
name = g_value_get_string ( gimp_value_array_index ( args , 0 ) ) ;
2004-12-31 07:28:38 +08:00
if ( success )
{
2007-12-11 17:54:41 +08:00
GimpBrush * brush = gimp_pdb_get_brush ( gimp , name , FALSE , error ) ;
2004-12-31 07:28:38 +08:00
if ( brush )
2009-11-01 01:48:38 +08:00
editable = gimp_data_is_writable ( GIMP_DATA ( brush ) ) ;
2004-12-31 07:28:38 +08:00
else
success = FALSE ;
}
2008-08-16 21:57:57 +08:00
return_vals = gimp_procedure_get_return_values ( procedure , success ,
error ? * error : NULL ) ;
2004-12-31 07:28:38 +08:00
if ( success )
2012-05-04 06:50:23 +08:00
g_value_set_boolean ( gimp_value_array_index ( return_vals , 1 ) , editable ) ;
2004-12-31 07:28:38 +08:00
2006-03-28 05:09:32 +08:00
return return_vals ;
2004-12-31 07:28:38 +08:00
}
2012-05-04 06:50:23 +08:00
static GimpValueArray *
2012-05-29 01:55:28 +08:00
brush_get_info_invoker ( GimpProcedure * procedure ,
2012-05-04 06:50:23 +08:00
Gimp * gimp ,
GimpContext * context ,
GimpProgress * progress ,
const GimpValueArray * args ,
GError * * error )
2004-09-29 06:01:21 +08:00
{
gboolean success = TRUE ;
2012-05-04 06:50:23 +08:00
GimpValueArray * return_vals ;
2006-04-03 00:03:32 +08:00
const gchar * name ;
2006-03-15 20:49:25 +08:00
gint32 width = 0 ;
gint32 height = 0 ;
gint32 mask_bpp = 0 ;
gint32 color_bpp = 0 ;
2004-09-29 06:01:21 +08:00
2012-05-04 06:50:23 +08:00
name = g_value_get_string ( gimp_value_array_index ( args , 0 ) ) ;
2004-09-29 06:01:21 +08:00
if ( success )
{
2007-12-11 17:54:41 +08:00
GimpBrush * brush = gimp_pdb_get_brush ( gimp , name , FALSE , error ) ;
2004-09-29 06:01:21 +08:00
2006-03-15 20:49:25 +08:00
if ( brush )
{
2012-04-23 15:40:56 +08:00
width = gimp_temp_buf_get_width ( brush - > mask ) ;
height = gimp_temp_buf_get_height ( brush - > mask ) ;
mask_bpp = babl_format_get_bytes_per_pixel ( gimp_temp_buf_get_format ( brush - > mask ) ) ;
color_bpp = brush - > pixmap ? babl_format_get_bytes_per_pixel ( gimp_temp_buf_get_format ( brush - > pixmap ) ) : 0 ;
2006-03-15 20:49:25 +08:00
}
else
success = FALSE ;
2004-09-29 06:01:21 +08:00
}
2008-08-16 21:57:57 +08:00
return_vals = gimp_procedure_get_return_values ( procedure , success ,
error ? * error : NULL ) ;
2004-09-29 06:01:21 +08:00
if ( success )
{
2012-05-04 06:50:23 +08:00
g_value_set_int ( gimp_value_array_index ( return_vals , 1 ) , width ) ;
g_value_set_int ( gimp_value_array_index ( return_vals , 2 ) , height ) ;
g_value_set_int ( gimp_value_array_index ( return_vals , 3 ) , mask_bpp ) ;
g_value_set_int ( gimp_value_array_index ( return_vals , 4 ) , color_bpp ) ;
2004-09-29 06:01:21 +08:00
}
2006-03-28 05:09:32 +08:00
return return_vals ;
2004-09-29 06:01:21 +08:00
}
2012-05-04 06:50:23 +08:00
static GimpValueArray *
2012-05-29 01:55:28 +08:00
brush_get_pixels_invoker ( GimpProcedure * procedure ,
2012-05-04 06:50:23 +08:00
Gimp * gimp ,
GimpContext * context ,
GimpProgress * progress ,
const GimpValueArray * args ,
GError * * error )
2004-10-06 07:28:17 +08:00
{
gboolean success = TRUE ;
2012-05-04 06:50:23 +08:00
GimpValueArray * return_vals ;
2006-04-03 00:03:32 +08:00
const gchar * name ;
2006-03-15 20:49:25 +08:00
gint32 width = 0 ;
gint32 height = 0 ;
2004-10-06 11:23:09 +08:00
gint32 mask_bpp = 0 ;
2004-10-06 07:28:17 +08:00
gint32 num_mask_bytes = 0 ;
guint8 * mask_bytes = NULL ;
2004-10-06 11:23:09 +08:00
gint32 color_bpp = 0 ;
gint32 num_color_bytes = 0 ;
guint8 * color_bytes = NULL ;
2004-10-06 07:28:17 +08:00
2012-05-04 06:50:23 +08:00
name = g_value_get_string ( gimp_value_array_index ( args , 0 ) ) ;
2004-10-06 07:28:17 +08:00
if ( success )
{
2007-12-11 17:54:41 +08:00
GimpBrush * brush = gimp_pdb_get_brush ( gimp , name , FALSE , error ) ;
2004-10-06 07:28:17 +08:00
if ( brush )
{
2012-04-23 15:40:56 +08:00
width = gimp_temp_buf_get_width ( brush - > mask ) ;
height = gimp_temp_buf_get_height ( brush - > mask ) ;
mask_bpp = babl_format_get_bytes_per_pixel ( gimp_temp_buf_get_format ( brush - > mask ) ) ;
num_mask_bytes = gimp_temp_buf_get_height ( brush - > mask ) *
gimp_temp_buf_get_width ( brush - > mask ) * mask_bpp ;
2012-04-09 05:56:52 +08:00
mask_bytes = g_memdup ( gimp_temp_buf_get_data ( brush - > mask ) ,
num_mask_bytes ) ;
2004-10-06 11:23:09 +08:00
if ( brush - > pixmap )
{
2012-04-23 15:40:56 +08:00
color_bpp = babl_format_get_bytes_per_pixel ( gimp_temp_buf_get_format ( brush - > pixmap ) ) ;
num_color_bytes = gimp_temp_buf_get_height ( brush - > pixmap ) *
gimp_temp_buf_get_width ( brush - > pixmap ) *
2012-04-09 00:47:49 +08:00
color_bpp ;
2012-04-09 05:56:52 +08:00
color_bytes = g_memdup ( gimp_temp_buf_get_data ( brush - > pixmap ) ,
2004-10-06 11:23:09 +08:00
num_color_bytes ) ;
}
2004-10-06 07:28:17 +08:00
}
else
success = FALSE ;
}
2008-08-16 21:57:57 +08:00
return_vals = gimp_procedure_get_return_values ( procedure , success ,
error ? * error : NULL ) ;
2004-10-06 07:28:17 +08:00
if ( success )
{
2012-05-04 06:50:23 +08:00
g_value_set_int ( gimp_value_array_index ( return_vals , 1 ) , width ) ;
g_value_set_int ( gimp_value_array_index ( return_vals , 2 ) , height ) ;
g_value_set_int ( gimp_value_array_index ( return_vals , 3 ) , mask_bpp ) ;
g_value_set_int ( gimp_value_array_index ( return_vals , 4 ) , num_mask_bytes ) ;
gimp_value_take_int8array ( gimp_value_array_index ( return_vals , 5 ) , mask_bytes , num_mask_bytes ) ;
g_value_set_int ( gimp_value_array_index ( return_vals , 6 ) , color_bpp ) ;
g_value_set_int ( gimp_value_array_index ( return_vals , 7 ) , num_color_bytes ) ;
gimp_value_take_int8array ( gimp_value_array_index ( return_vals , 8 ) , color_bytes , num_color_bytes ) ;
2004-10-06 07:28:17 +08:00
}
2006-03-28 05:09:32 +08:00
return return_vals ;
2004-10-06 07:28:17 +08:00
}
2012-05-04 06:50:23 +08:00
static GimpValueArray *
2012-05-29 01:55:28 +08:00
brush_get_spacing_invoker ( GimpProcedure * procedure ,
2012-05-04 06:50:23 +08:00
Gimp * gimp ,
GimpContext * context ,
GimpProgress * progress ,
const GimpValueArray * args ,
GError * * error )
2004-09-29 06:01:21 +08:00
{
gboolean success = TRUE ;
2012-05-04 06:50:23 +08:00
GimpValueArray * return_vals ;
2006-04-03 00:03:32 +08:00
const gchar * name ;
2006-03-15 20:49:25 +08:00
gint32 spacing = 0 ;
2004-09-29 06:01:21 +08:00
2012-05-04 06:50:23 +08:00
name = g_value_get_string ( gimp_value_array_index ( args , 0 ) ) ;
2004-09-29 06:01:21 +08:00
if ( success )
{
2007-12-11 17:54:41 +08:00
GimpBrush * brush = gimp_pdb_get_brush ( gimp , name , FALSE , error ) ;
2004-09-29 06:01:21 +08:00
2006-03-15 20:49:25 +08:00
if ( brush )
spacing = gimp_brush_get_spacing ( brush ) ;
else
success = FALSE ;
2004-09-29 06:01:21 +08:00
}
2008-08-16 21:57:57 +08:00
return_vals = gimp_procedure_get_return_values ( procedure , success ,
error ? * error : NULL ) ;
2004-09-29 06:01:21 +08:00
if ( success )
2012-05-04 06:50:23 +08:00
g_value_set_int ( gimp_value_array_index ( return_vals , 1 ) , spacing ) ;
2004-09-29 06:01:21 +08:00
2006-03-28 05:09:32 +08:00
return return_vals ;
2004-09-29 06:01:21 +08:00
}
2012-05-04 06:50:23 +08:00
static GimpValueArray *
2012-05-29 01:55:28 +08:00
brush_set_spacing_invoker ( GimpProcedure * procedure ,
2012-05-04 06:50:23 +08:00
Gimp * gimp ,
GimpContext * context ,
GimpProgress * progress ,
const GimpValueArray * args ,
GError * * error )
2004-09-29 06:01:21 +08:00
{
gboolean success = TRUE ;
2006-04-03 00:03:32 +08:00
const gchar * name ;
2004-09-29 06:01:21 +08:00
gint32 spacing ;
2012-05-04 06:50:23 +08:00
name = g_value_get_string ( gimp_value_array_index ( args , 0 ) ) ;
spacing = g_value_get_int ( gimp_value_array_index ( args , 1 ) ) ;
2004-09-29 06:01:21 +08:00
if ( success )
{
2007-12-11 17:54:41 +08:00
GimpBrush * brush = gimp_pdb_get_brush ( gimp , name , TRUE , error ) ;
2004-09-29 06:01:21 +08:00
2006-01-05 16:37:17 +08:00
if ( brush )
2004-09-29 06:01:21 +08:00
gimp_brush_set_spacing ( brush , spacing ) ;
else
success = FALSE ;
}
2008-08-16 21:57:57 +08:00
return gimp_procedure_get_return_values ( procedure , success ,
error ? * error : NULL ) ;
2006-04-05 05:11:45 +08:00
}
2012-05-04 06:50:23 +08:00
static GimpValueArray *
2012-05-29 01:55:28 +08:00
brush_get_shape_invoker ( GimpProcedure * procedure ,
2012-05-04 06:50:23 +08:00
Gimp * gimp ,
GimpContext * context ,
GimpProgress * progress ,
const GimpValueArray * args ,
GError * * error )
2006-04-05 05:11:45 +08:00
{
gboolean success = TRUE ;
2012-05-04 06:50:23 +08:00
GimpValueArray * return_vals ;
2006-04-05 05:11:45 +08:00
const gchar * name ;
gint32 shape = 0 ;
2012-05-04 06:50:23 +08:00
name = g_value_get_string ( gimp_value_array_index ( args , 0 ) ) ;
2006-04-05 05:11:45 +08:00
if ( success )
{
2007-12-11 17:54:41 +08:00
GimpBrush * brush = gimp_pdb_get_generated_brush ( gimp , name , FALSE , error ) ;
2006-04-05 05:11:45 +08:00
2007-12-11 17:54:41 +08:00
if ( brush )
2006-04-05 05:11:45 +08:00
shape = GIMP_BRUSH_GENERATED ( brush ) - > shape ;
else
success = FALSE ;
}
2008-08-16 21:57:57 +08:00
return_vals = gimp_procedure_get_return_values ( procedure , success ,
error ? * error : NULL ) ;
2006-04-05 05:11:45 +08:00
if ( success )
2012-05-04 06:50:23 +08:00
g_value_set_enum ( gimp_value_array_index ( return_vals , 1 ) , shape ) ;
2006-04-05 05:11:45 +08:00
return return_vals ;
}
2012-05-04 06:50:23 +08:00
static GimpValueArray *
2012-05-29 01:55:28 +08:00
brush_set_shape_invoker ( GimpProcedure * procedure ,
2012-05-04 06:50:23 +08:00
Gimp * gimp ,
GimpContext * context ,
GimpProgress * progress ,
const GimpValueArray * args ,
GError * * error )
2006-04-05 05:11:45 +08:00
{
gboolean success = TRUE ;
2012-05-04 06:50:23 +08:00
GimpValueArray * return_vals ;
2006-04-05 05:11:45 +08:00
const gchar * name ;
2008-02-08 01:08:54 +08:00
gint32 shape_in ;
gint32 shape_out = 0 ;
2006-04-05 05:11:45 +08:00
2012-05-04 06:50:23 +08:00
name = g_value_get_string ( gimp_value_array_index ( args , 0 ) ) ;
shape_in = g_value_get_enum ( gimp_value_array_index ( args , 1 ) ) ;
2006-04-05 05:11:45 +08:00
if ( success )
{
2008-02-08 01:08:54 +08:00
GimpBrush * brush = gimp_pdb_get_generated_brush ( gimp , name , TRUE , error ) ;
2006-04-05 05:11:45 +08:00
2007-12-11 17:54:41 +08:00
if ( brush )
2008-02-08 01:08:54 +08:00
{
gimp_brush_generated_set_shape ( GIMP_BRUSH_GENERATED ( brush ) ,
shape_in ) ;
shape_out = GIMP_BRUSH_GENERATED ( brush ) - > shape ;
}
2006-04-05 05:11:45 +08:00
else
success = FALSE ;
}
2008-08-16 21:57:57 +08:00
return_vals = gimp_procedure_get_return_values ( procedure , success ,
error ? * error : NULL ) ;
2006-04-05 05:11:45 +08:00
if ( success )
2012-05-04 06:50:23 +08:00
g_value_set_enum ( gimp_value_array_index ( return_vals , 1 ) , shape_out ) ;
2006-04-05 05:11:45 +08:00
return return_vals ;
}
2012-05-04 06:50:23 +08:00
static GimpValueArray *
2012-05-29 01:55:28 +08:00
brush_get_radius_invoker ( GimpProcedure * procedure ,
2012-05-04 06:50:23 +08:00
Gimp * gimp ,
GimpContext * context ,
GimpProgress * progress ,
const GimpValueArray * args ,
GError * * error )
2006-04-05 05:11:45 +08:00
{
gboolean success = TRUE ;
2012-05-04 06:50:23 +08:00
GimpValueArray * return_vals ;
2006-04-05 05:11:45 +08:00
const gchar * name ;
2008-02-08 01:08:54 +08:00
gdouble radius = 0.0 ;
2006-04-05 05:11:45 +08:00
2012-05-04 06:50:23 +08:00
name = g_value_get_string ( gimp_value_array_index ( args , 0 ) ) ;
2006-04-05 05:11:45 +08:00
if ( success )
{
2007-12-11 17:54:41 +08:00
GimpBrush * brush = gimp_pdb_get_generated_brush ( gimp , name , FALSE , error ) ;
2006-04-05 05:11:45 +08:00
2007-12-11 17:54:41 +08:00
if ( brush )
2008-02-08 01:08:54 +08:00
radius = GIMP_BRUSH_GENERATED ( brush ) - > radius ;
2006-04-05 05:11:45 +08:00
else
success = FALSE ;
}
2008-08-16 21:57:57 +08:00
return_vals = gimp_procedure_get_return_values ( procedure , success ,
error ? * error : NULL ) ;
2006-04-05 05:11:45 +08:00
if ( success )
2012-05-04 06:50:23 +08:00
g_value_set_double ( gimp_value_array_index ( return_vals , 1 ) , radius ) ;
2006-04-05 05:11:45 +08:00
return return_vals ;
}
2012-05-04 06:50:23 +08:00
static GimpValueArray *
2012-05-29 01:55:28 +08:00
brush_set_radius_invoker ( GimpProcedure * procedure ,
2012-05-04 06:50:23 +08:00
Gimp * gimp ,
GimpContext * context ,
GimpProgress * progress ,
const GimpValueArray * args ,
GError * * error )
2006-04-05 05:11:45 +08:00
{
gboolean success = TRUE ;
2012-05-04 06:50:23 +08:00
GimpValueArray * return_vals ;
2006-04-05 05:11:45 +08:00
const gchar * name ;
2008-02-08 01:08:54 +08:00
gdouble radius_in ;
gdouble radius_out = 0.0 ;
2006-04-05 05:11:45 +08:00
2012-05-04 06:50:23 +08:00
name = g_value_get_string ( gimp_value_array_index ( args , 0 ) ) ;
radius_in = g_value_get_double ( gimp_value_array_index ( args , 1 ) ) ;
2006-04-05 05:11:45 +08:00
if ( success )
{
2008-02-08 01:08:54 +08:00
GimpBrush * brush = gimp_pdb_get_generated_brush ( gimp , name , TRUE , error ) ;
2006-04-05 05:11:45 +08:00
2007-12-11 17:54:41 +08:00
if ( brush )
2008-02-08 01:08:54 +08:00
{
gimp_brush_generated_set_radius ( GIMP_BRUSH_GENERATED ( brush ) ,
radius_in ) ;
radius_out = GIMP_BRUSH_GENERATED ( brush ) - > radius ;
}
2006-04-05 05:11:45 +08:00
else
success = FALSE ;
}
2008-08-16 21:57:57 +08:00
return_vals = gimp_procedure_get_return_values ( procedure , success ,
error ? * error : NULL ) ;
2006-04-05 05:11:45 +08:00
if ( success )
2012-05-04 06:50:23 +08:00
g_value_set_double ( gimp_value_array_index ( return_vals , 1 ) , radius_out ) ;
2006-04-05 05:11:45 +08:00
return return_vals ;
}
2012-05-04 06:50:23 +08:00
static GimpValueArray *
2012-05-29 01:55:28 +08:00
brush_get_spikes_invoker ( GimpProcedure * procedure ,
2012-05-04 06:50:23 +08:00
Gimp * gimp ,
GimpContext * context ,
GimpProgress * progress ,
const GimpValueArray * args ,
GError * * error )
2006-04-05 05:11:45 +08:00
{
gboolean success = TRUE ;
2012-05-04 06:50:23 +08:00
GimpValueArray * return_vals ;
2006-04-05 05:11:45 +08:00
const gchar * name ;
2008-02-08 01:08:54 +08:00
gint32 spikes = 0 ;
2006-04-05 05:11:45 +08:00
2012-05-04 06:50:23 +08:00
name = g_value_get_string ( gimp_value_array_index ( args , 0 ) ) ;
2006-04-05 05:11:45 +08:00
if ( success )
{
2007-12-11 17:54:41 +08:00
GimpBrush * brush = gimp_pdb_get_generated_brush ( gimp , name , FALSE , error ) ;
2006-04-05 05:11:45 +08:00
2007-12-11 17:54:41 +08:00
if ( brush )
2008-02-08 01:08:54 +08:00
spikes = GIMP_BRUSH_GENERATED ( brush ) - > spikes ;
2006-04-05 05:11:45 +08:00
else
success = FALSE ;
}
2008-08-16 21:57:57 +08:00
return_vals = gimp_procedure_get_return_values ( procedure , success ,
error ? * error : NULL ) ;
2006-04-05 05:11:45 +08:00
if ( success )
2012-05-04 06:50:23 +08:00
g_value_set_int ( gimp_value_array_index ( return_vals , 1 ) , spikes ) ;
2006-04-05 05:11:45 +08:00
return return_vals ;
}
2012-05-04 06:50:23 +08:00
static GimpValueArray *
2012-05-29 01:55:28 +08:00
brush_set_spikes_invoker ( GimpProcedure * procedure ,
2012-05-04 06:50:23 +08:00
Gimp * gimp ,
GimpContext * context ,
GimpProgress * progress ,
const GimpValueArray * args ,
GError * * error )
2006-04-05 05:11:45 +08:00
{
gboolean success = TRUE ;
2012-05-04 06:50:23 +08:00
GimpValueArray * return_vals ;
2006-04-05 05:11:45 +08:00
const gchar * name ;
2008-02-08 01:08:54 +08:00
gint32 spikes_in ;
gint32 spikes_out = 0 ;
2006-04-05 05:11:45 +08:00
2012-05-04 06:50:23 +08:00
name = g_value_get_string ( gimp_value_array_index ( args , 0 ) ) ;
spikes_in = g_value_get_int ( gimp_value_array_index ( args , 1 ) ) ;
2006-04-05 05:11:45 +08:00
if ( success )
{
2008-02-08 01:08:54 +08:00
GimpBrush * brush = gimp_pdb_get_generated_brush ( gimp , name , TRUE , error ) ;
2006-04-05 05:11:45 +08:00
2007-12-11 17:54:41 +08:00
if ( brush )
2008-02-08 01:08:54 +08:00
{
gimp_brush_generated_set_spikes ( GIMP_BRUSH_GENERATED ( brush ) ,
spikes_in ) ;
spikes_out = GIMP_BRUSH_GENERATED ( brush ) - > spikes ;
}
2006-04-05 05:11:45 +08:00
else
success = FALSE ;
}
2008-08-16 21:57:57 +08:00
return_vals = gimp_procedure_get_return_values ( procedure , success ,
error ? * error : NULL ) ;
2006-04-05 05:11:45 +08:00
if ( success )
2012-05-04 06:50:23 +08:00
g_value_set_int ( gimp_value_array_index ( return_vals , 1 ) , spikes_out ) ;
2006-04-05 05:11:45 +08:00
return return_vals ;
2004-09-29 06:01:21 +08:00
}
2012-05-04 06:50:23 +08:00
static GimpValueArray *
2012-05-29 01:55:28 +08:00
brush_get_hardness_invoker ( GimpProcedure * procedure ,
2012-05-04 06:50:23 +08:00
Gimp * gimp ,
GimpContext * context ,
GimpProgress * progress ,
const GimpValueArray * args ,
GError * * error )
2004-12-31 07:28:38 +08:00
{
gboolean success = TRUE ;
2012-05-04 06:50:23 +08:00
GimpValueArray * return_vals ;
2006-04-03 00:03:32 +08:00
const gchar * name ;
2008-02-08 01:08:54 +08:00
gdouble hardness = 0.0 ;
2004-12-31 07:28:38 +08:00
2012-05-04 06:50:23 +08:00
name = g_value_get_string ( gimp_value_array_index ( args , 0 ) ) ;
2004-12-31 07:28:38 +08:00
if ( success )
{
2008-02-08 01:08:54 +08:00
GimpBrush * brush = gimp_pdb_get_generated_brush ( gimp , name , FALSE , error ) ;
2004-12-31 07:28:38 +08:00
2007-12-11 17:54:41 +08:00
if ( brush )
2008-02-08 01:08:54 +08:00
hardness = GIMP_BRUSH_GENERATED ( brush ) - > hardness ;
2006-03-15 20:49:25 +08:00
else
success = FALSE ;
2004-12-31 07:28:38 +08:00
}
2008-08-16 21:57:57 +08:00
return_vals = gimp_procedure_get_return_values ( procedure , success ,
error ? * error : NULL ) ;
2004-12-31 07:28:38 +08:00
if ( success )
2012-05-04 06:50:23 +08:00
g_value_set_double ( gimp_value_array_index ( return_vals , 1 ) , hardness ) ;
2004-12-31 07:28:38 +08:00
2006-03-28 05:09:32 +08:00
return return_vals ;
2004-12-31 07:28:38 +08:00
}
2012-05-04 06:50:23 +08:00
static GimpValueArray *
2012-05-29 01:55:28 +08:00
brush_set_hardness_invoker ( GimpProcedure * procedure ,
2012-05-04 06:50:23 +08:00
Gimp * gimp ,
GimpContext * context ,
GimpProgress * progress ,
const GimpValueArray * args ,
GError * * error )
2004-12-31 07:28:38 +08:00
{
gboolean success = TRUE ;
2012-05-04 06:50:23 +08:00
GimpValueArray * return_vals ;
2006-04-03 00:03:32 +08:00
const gchar * name ;
2008-02-08 01:08:54 +08:00
gdouble hardness_in ;
gdouble hardness_out = 0.0 ;
2004-12-31 07:28:38 +08:00
2012-05-04 06:50:23 +08:00
name = g_value_get_string ( gimp_value_array_index ( args , 0 ) ) ;
hardness_in = g_value_get_double ( gimp_value_array_index ( args , 1 ) ) ;
2004-12-31 07:28:38 +08:00
if ( success )
{
2007-12-11 17:54:41 +08:00
GimpBrush * brush = gimp_pdb_get_generated_brush ( gimp , name , TRUE , error ) ;
2004-12-31 07:28:38 +08:00
2007-12-11 17:54:41 +08:00
if ( brush )
2006-04-05 05:11:45 +08:00
{
2008-02-08 01:08:54 +08:00
gimp_brush_generated_set_hardness ( GIMP_BRUSH_GENERATED ( brush ) ,
hardness_in ) ;
hardness_out = GIMP_BRUSH_GENERATED ( brush ) - > hardness ;
2006-04-05 05:11:45 +08:00
}
2006-03-15 20:49:25 +08:00
else
success = FALSE ;
2004-12-31 07:28:38 +08:00
}
2008-08-16 21:57:57 +08:00
return_vals = gimp_procedure_get_return_values ( procedure , success ,
error ? * error : NULL ) ;
2004-12-31 07:28:38 +08:00
if ( success )
2012-05-04 06:50:23 +08:00
g_value_set_double ( gimp_value_array_index ( return_vals , 1 ) , hardness_out ) ;
2004-12-31 07:28:38 +08:00
2006-03-28 05:09:32 +08:00
return return_vals ;
2004-12-31 07:28:38 +08:00
}
2012-05-04 06:50:23 +08:00
static GimpValueArray *
2012-05-29 01:55:28 +08:00
brush_get_aspect_ratio_invoker ( GimpProcedure * procedure ,
2012-05-04 06:50:23 +08:00
Gimp * gimp ,
GimpContext * context ,
GimpProgress * progress ,
const GimpValueArray * args ,
GError * * error )
2004-12-31 07:28:38 +08:00
{
gboolean success = TRUE ;
2012-05-04 06:50:23 +08:00
GimpValueArray * return_vals ;
2006-04-03 00:03:32 +08:00
const gchar * name ;
2008-02-08 01:08:54 +08:00
gdouble aspect_ratio = 0.0 ;
2004-12-31 07:28:38 +08:00
2012-05-04 06:50:23 +08:00
name = g_value_get_string ( gimp_value_array_index ( args , 0 ) ) ;
2004-12-31 07:28:38 +08:00
if ( success )
{
2008-02-08 01:08:54 +08:00
GimpBrush * brush = gimp_pdb_get_generated_brush ( gimp , name , FALSE , error ) ;
2004-12-31 07:28:38 +08:00
2007-12-11 17:54:41 +08:00
if ( brush )
2008-02-08 01:08:54 +08:00
aspect_ratio = GIMP_BRUSH_GENERATED ( brush ) - > aspect_ratio ;
2006-03-15 20:49:25 +08:00
else
success = FALSE ;
2004-12-31 07:28:38 +08:00
}
2008-08-16 21:57:57 +08:00
return_vals = gimp_procedure_get_return_values ( procedure , success ,
error ? * error : NULL ) ;
2004-12-31 07:28:38 +08:00
if ( success )
2012-05-04 06:50:23 +08:00
g_value_set_double ( gimp_value_array_index ( return_vals , 1 ) , aspect_ratio ) ;
2004-12-31 07:28:38 +08:00
2006-03-28 05:09:32 +08:00
return return_vals ;
2004-12-31 07:28:38 +08:00
}
2012-05-04 06:50:23 +08:00
static GimpValueArray *
2012-05-29 01:55:28 +08:00
brush_set_aspect_ratio_invoker ( GimpProcedure * procedure ,
2012-05-04 06:50:23 +08:00
Gimp * gimp ,
GimpContext * context ,
GimpProgress * progress ,
const GimpValueArray * args ,
GError * * error )
2004-12-31 07:28:38 +08:00
{
gboolean success = TRUE ;
2012-05-04 06:50:23 +08:00
GimpValueArray * return_vals ;
2006-04-03 00:03:32 +08:00
const gchar * name ;
2008-02-08 01:08:54 +08:00
gdouble aspect_ratio_in ;
gdouble aspect_ratio_out = 0.0 ;
2004-12-31 07:28:38 +08:00
2012-05-04 06:50:23 +08:00
name = g_value_get_string ( gimp_value_array_index ( args , 0 ) ) ;
aspect_ratio_in = g_value_get_double ( gimp_value_array_index ( args , 1 ) ) ;
2004-12-31 07:28:38 +08:00
if ( success )
{
2007-12-11 17:54:41 +08:00
GimpBrush * brush = gimp_pdb_get_generated_brush ( gimp , name , TRUE , error ) ;
2004-12-31 07:28:38 +08:00
2007-12-11 17:54:41 +08:00
if ( brush )
2006-04-05 05:11:45 +08:00
{
2008-02-08 01:08:54 +08:00
gimp_brush_generated_set_aspect_ratio ( GIMP_BRUSH_GENERATED ( brush ) ,
aspect_ratio_in ) ;
aspect_ratio_out = GIMP_BRUSH_GENERATED ( brush ) - > aspect_ratio ;
2006-04-05 05:11:45 +08:00
}
2006-03-15 20:49:25 +08:00
else
success = FALSE ;
2004-12-31 07:28:38 +08:00
}
2008-08-16 21:57:57 +08:00
return_vals = gimp_procedure_get_return_values ( procedure , success ,
error ? * error : NULL ) ;
2004-12-31 07:28:38 +08:00
if ( success )
2012-05-04 06:50:23 +08:00
g_value_set_double ( gimp_value_array_index ( return_vals , 1 ) , aspect_ratio_out ) ;
2004-12-31 07:28:38 +08:00
2006-03-28 05:09:32 +08:00
return return_vals ;
2004-12-31 07:28:38 +08:00
}
2012-05-04 06:50:23 +08:00
static GimpValueArray *
2012-05-29 01:55:28 +08:00
brush_get_angle_invoker ( GimpProcedure * procedure ,
2012-05-04 06:50:23 +08:00
Gimp * gimp ,
GimpContext * context ,
GimpProgress * progress ,
const GimpValueArray * args ,
GError * * error )
2004-12-31 07:28:38 +08:00
{
gboolean success = TRUE ;
2012-05-04 06:50:23 +08:00
GimpValueArray * return_vals ;
2006-04-03 00:03:32 +08:00
const gchar * name ;
2008-02-08 01:08:54 +08:00
gdouble angle = 0.0 ;
2004-12-31 07:28:38 +08:00
2012-05-04 06:50:23 +08:00
name = g_value_get_string ( gimp_value_array_index ( args , 0 ) ) ;
2004-12-31 07:28:38 +08:00
if ( success )
{
2008-02-08 01:08:54 +08:00
GimpBrush * brush = gimp_pdb_get_generated_brush ( gimp , name , FALSE , error ) ;
2004-12-31 07:28:38 +08:00
2007-12-11 17:54:41 +08:00
if ( brush )
2008-02-08 01:08:54 +08:00
angle = GIMP_BRUSH_GENERATED ( brush ) - > angle ;
2006-03-15 20:49:25 +08:00
else
success = FALSE ;
2004-12-31 07:28:38 +08:00
}
2008-08-16 21:57:57 +08:00
return_vals = gimp_procedure_get_return_values ( procedure , success ,
error ? * error : NULL ) ;
2004-12-31 07:28:38 +08:00
if ( success )
2012-05-04 06:50:23 +08:00
g_value_set_double ( gimp_value_array_index ( return_vals , 1 ) , angle ) ;
2004-12-31 07:28:38 +08:00
2006-03-28 05:09:32 +08:00
return return_vals ;
2004-12-31 07:28:38 +08:00
}
2012-05-04 06:50:23 +08:00
static GimpValueArray *
2012-05-29 01:55:28 +08:00
brush_set_angle_invoker ( GimpProcedure * procedure ,
2012-05-04 06:50:23 +08:00
Gimp * gimp ,
GimpContext * context ,
GimpProgress * progress ,
const GimpValueArray * args ,
GError * * error )
2004-12-31 07:28:38 +08:00
{
gboolean success = TRUE ;
2012-05-04 06:50:23 +08:00
GimpValueArray * return_vals ;
2006-04-03 00:03:32 +08:00
const gchar * name ;
2006-04-05 05:11:45 +08:00
gdouble angle_in ;
gdouble angle_out = 0.0 ;
2004-12-31 07:28:38 +08:00
2012-05-04 06:50:23 +08:00
name = g_value_get_string ( gimp_value_array_index ( args , 0 ) ) ;
angle_in = g_value_get_double ( gimp_value_array_index ( args , 1 ) ) ;
2004-12-31 07:28:38 +08:00
if ( success )
{
2007-12-11 17:54:41 +08:00
GimpBrush * brush = gimp_pdb_get_generated_brush ( gimp , name , TRUE , error ) ;
2004-12-31 07:28:38 +08:00
2007-12-11 17:54:41 +08:00
if ( brush )
2006-04-05 05:11:45 +08:00
{
gimp_brush_generated_set_angle ( GIMP_BRUSH_GENERATED ( brush ) ,
angle_in ) ;
angle_out = GIMP_BRUSH_GENERATED ( brush ) - > angle ;
}
2006-03-15 20:49:25 +08:00
else
success = FALSE ;
2004-12-31 07:28:38 +08:00
}
2008-08-16 21:57:57 +08:00
return_vals = gimp_procedure_get_return_values ( procedure , success ,
error ? * error : NULL ) ;
2004-12-31 07:28:38 +08:00
if ( success )
2012-05-04 06:50:23 +08:00
g_value_set_double ( gimp_value_array_index ( return_vals , 1 ) , angle_out ) ;
2004-12-31 07:28:38 +08:00
2006-03-28 05:09:32 +08:00
return return_vals ;
2004-12-31 07:28:38 +08:00
}
2006-04-05 05:11:45 +08:00
void
2006-04-26 17:13:47 +08:00
register_brush_procs ( GimpPDB * pdb )
2004-12-31 07:28:38 +08:00
{
2006-04-05 05:11:45 +08:00
GimpProcedure * procedure ;
2004-12-31 07:28:38 +08:00
2006-04-05 05:11:45 +08:00
/*
* gimp - brush - new
*/
2006-04-06 18:01:30 +08:00
procedure = gimp_procedure_new ( brush_new_invoker ) ;
2008-04-04 18:58:56 +08:00
gimp_object_set_static_name ( GIMP_OBJECT ( procedure ) ,
" gimp-brush-new " ) ;
2006-04-05 05:11:45 +08:00
gimp_procedure_set_static_strings ( procedure ,
" gimp-brush-new " ,
" Creates a new brush " ,
" This procedure creates a new, uninitialized brush " ,
" Michael Natterer <mitch@gimp.org> " ,
" Michael Natterer " ,
" 2004 " ,
NULL ) ;
gimp_procedure_add_argument ( procedure ,
gimp_param_spec_string ( " name " ,
" name " ,
" The requested name of the new brush " ,
2007-04-25 22:23:05 +08:00
FALSE , FALSE , TRUE ,
2006-04-05 05:11:45 +08:00
NULL ,
GIMP_PARAM_READWRITE ) ) ;
gimp_procedure_add_return_value ( procedure ,
gimp_param_spec_string ( " actual-name " ,
" actual name " ,
" The actual new brush name " ,
2007-04-25 22:23:05 +08:00
FALSE , FALSE , FALSE ,
2006-04-05 05:11:45 +08:00
NULL ,
GIMP_PARAM_READWRITE ) ) ;
2006-04-26 17:13:47 +08:00
gimp_pdb_register_procedure ( pdb , procedure ) ;
2006-04-07 16:16:26 +08:00
g_object_unref ( procedure ) ;
2004-12-31 07:28:38 +08:00
2006-04-05 05:11:45 +08:00
/*
* gimp - brush - duplicate
*/
2006-04-06 18:01:30 +08:00
procedure = gimp_procedure_new ( brush_duplicate_invoker ) ;
2008-04-04 18:58:56 +08:00
gimp_object_set_static_name ( GIMP_OBJECT ( procedure ) ,
" gimp-brush-duplicate " ) ;
2006-04-05 05:11:45 +08:00
gimp_procedure_set_static_strings ( procedure ,
" gimp-brush-duplicate " ,
" Duplicates a brush " ,
" This procedure creates an identical brush by a different name " ,
" Michael Natterer <mitch@gimp.org> " ,
" Michael Natterer " ,
" 2004 " ,
NULL ) ;
gimp_procedure_add_argument ( procedure ,
gimp_param_spec_string ( " name " ,
" name " ,
" The brush name " ,
2007-12-11 17:54:41 +08:00
FALSE , FALSE , TRUE ,
2006-04-05 05:11:45 +08:00
NULL ,
GIMP_PARAM_READWRITE ) ) ;
gimp_procedure_add_return_value ( procedure ,
gimp_param_spec_string ( " copy-name " ,
" copy name " ,
" The name of the brush's copy " ,
2007-04-25 22:23:05 +08:00
FALSE , FALSE , FALSE ,
2006-04-05 05:11:45 +08:00
NULL ,
GIMP_PARAM_READWRITE ) ) ;
2006-04-26 17:13:47 +08:00
gimp_pdb_register_procedure ( pdb , procedure ) ;
2006-04-07 16:16:26 +08:00
g_object_unref ( procedure ) ;
2004-12-31 07:28:38 +08:00
2006-04-05 05:11:45 +08:00
/*
* gimp - brush - is - generated
*/
2006-04-06 18:01:30 +08:00
procedure = gimp_procedure_new ( brush_is_generated_invoker ) ;
2008-04-04 18:58:56 +08:00
gimp_object_set_static_name ( GIMP_OBJECT ( procedure ) ,
" gimp-brush-is-generated " ) ;
2006-04-05 05:11:45 +08:00
gimp_procedure_set_static_strings ( procedure ,
" gimp-brush-is-generated " ,
" Tests if brush is generated " ,
" Returns TRUE if this brush is parametric, FALSE for other types " ,
" Bill Skaggs <weskaggs@primate.ucdavis.edu> " ,
" Bill Skaggs " ,
" 2004 " ,
NULL ) ;
gimp_procedure_add_argument ( procedure ,
gimp_param_spec_string ( " name " ,
" name " ,
" The brush name " ,
2007-12-11 17:54:41 +08:00
FALSE , FALSE , TRUE ,
2006-04-05 05:11:45 +08:00
NULL ,
GIMP_PARAM_READWRITE ) ) ;
gimp_procedure_add_return_value ( procedure ,
g_param_spec_boolean ( " generated " ,
" generated " ,
" TRUE if the brush is generated " ,
FALSE ,
GIMP_PARAM_READWRITE ) ) ;
2006-04-26 17:13:47 +08:00
gimp_pdb_register_procedure ( pdb , procedure ) ;
2006-04-07 16:16:26 +08:00
g_object_unref ( procedure ) ;
2004-12-31 07:28:38 +08:00
2006-04-05 05:11:45 +08:00
/*
* gimp - brush - rename
*/
2006-04-06 18:01:30 +08:00
procedure = gimp_procedure_new ( brush_rename_invoker ) ;
2008-04-04 18:58:56 +08:00
gimp_object_set_static_name ( GIMP_OBJECT ( procedure ) ,
" gimp-brush-rename " ) ;
2006-04-05 05:11:45 +08:00
gimp_procedure_set_static_strings ( procedure ,
" gimp-brush-rename " ,
" Rename a brush " ,
" This procedure renames a brush " ,
" Michael Natterer <mitch@gimp.org> " ,
" Michael Natterer " ,
" 2004 " ,
NULL ) ;
gimp_procedure_add_argument ( procedure ,
gimp_param_spec_string ( " name " ,
" name " ,
" The brush name " ,
2007-12-11 17:54:41 +08:00
FALSE , FALSE , TRUE ,
2006-04-05 05:11:45 +08:00
NULL ,
GIMP_PARAM_READWRITE ) ) ;
gimp_procedure_add_argument ( procedure ,
gimp_param_spec_string ( " new-name " ,
" new name " ,
" The new name of the brush " ,
2007-04-25 22:23:05 +08:00
FALSE , FALSE , TRUE ,
2006-04-05 05:11:45 +08:00
NULL ,
GIMP_PARAM_READWRITE ) ) ;
gimp_procedure_add_return_value ( procedure ,
gimp_param_spec_string ( " actual-name " ,
" actual name " ,
" The actual new name of the brush " ,
2007-04-25 22:23:05 +08:00
FALSE , FALSE , FALSE ,
2006-04-05 05:11:45 +08:00
NULL ,
GIMP_PARAM_READWRITE ) ) ;
2006-04-26 17:13:47 +08:00
gimp_pdb_register_procedure ( pdb , procedure ) ;
2006-04-07 16:16:26 +08:00
g_object_unref ( procedure ) ;
2004-12-31 07:28:38 +08:00
2006-04-05 05:11:45 +08:00
/*
* gimp - brush - delete
*/
2006-04-06 18:01:30 +08:00
procedure = gimp_procedure_new ( brush_delete_invoker ) ;
2008-04-04 18:58:56 +08:00
gimp_object_set_static_name ( GIMP_OBJECT ( procedure ) ,
" gimp-brush-delete " ) ;
2006-04-05 05:11:45 +08:00
gimp_procedure_set_static_strings ( procedure ,
" gimp-brush-delete " ,
" Deletes a brush " ,
" This procedure deletes a brush " ,
" Michael Natterer <mitch@gimp.org> " ,
" Michael Natterer " ,
" 2004 " ,
NULL ) ;
gimp_procedure_add_argument ( procedure ,
gimp_param_spec_string ( " name " ,
" name " ,
" The brush name " ,
2007-12-11 17:54:41 +08:00
FALSE , FALSE , TRUE ,
2006-04-05 05:11:45 +08:00
NULL ,
GIMP_PARAM_READWRITE ) ) ;
2006-04-26 17:13:47 +08:00
gimp_pdb_register_procedure ( pdb , procedure ) ;
2006-04-07 16:16:26 +08:00
g_object_unref ( procedure ) ;
2004-12-31 07:28:38 +08:00
2006-04-05 05:11:45 +08:00
/*
* gimp - brush - is - editable
*/
2006-04-06 18:01:30 +08:00
procedure = gimp_procedure_new ( brush_is_editable_invoker ) ;
2008-04-04 18:58:56 +08:00
gimp_object_set_static_name ( GIMP_OBJECT ( procedure ) ,
" gimp-brush-is-editable " ) ;
2006-04-05 05:11:45 +08:00
gimp_procedure_set_static_strings ( procedure ,
" gimp-brush-is-editable " ,
" Tests if brush can be edited " ,
" Returns TRUE if you have permission to change the brush " ,
" Bill Skaggs <weskaggs@primate.ucdavis.edu> " ,
" Bill Skaggs " ,
" 2004 " ,
NULL ) ;
gimp_procedure_add_argument ( procedure ,
gimp_param_spec_string ( " name " ,
" name " ,
" The brush name " ,
2007-12-11 17:54:41 +08:00
FALSE , FALSE , TRUE ,
2006-04-05 05:11:45 +08:00
NULL ,
GIMP_PARAM_READWRITE ) ) ;
gimp_procedure_add_return_value ( procedure ,
g_param_spec_boolean ( " editable " ,
" editable " ,
" TRUE if the brush can be edited " ,
FALSE ,
GIMP_PARAM_READWRITE ) ) ;
2006-04-26 17:13:47 +08:00
gimp_pdb_register_procedure ( pdb , procedure ) ;
2006-04-07 16:16:26 +08:00
g_object_unref ( procedure ) ;
2004-12-31 07:28:38 +08:00
2006-04-05 05:11:45 +08:00
/*
* gimp - brush - get - info
*/
2006-04-06 18:01:30 +08:00
procedure = gimp_procedure_new ( brush_get_info_invoker ) ;
2008-04-04 18:58:56 +08:00
gimp_object_set_static_name ( GIMP_OBJECT ( procedure ) ,
" gimp-brush-get-info " ) ;
2006-04-05 05:11:45 +08:00
gimp_procedure_set_static_strings ( procedure ,
" gimp-brush-get-info " ,
" Retrieve information about the specified brush. " ,
" This procedure retrieves information about the specified brush. This includes the brush name, and the brush extents (width and height). " ,
" Michael Natterer <mitch@gimp.org> " ,
" Michael Natterer " ,
" 2004 " ,
NULL ) ;
gimp_procedure_add_argument ( procedure ,
gimp_param_spec_string ( " name " ,
" name " ,
" The brush name " ,
2007-12-11 17:54:41 +08:00
FALSE , FALSE , TRUE ,
2006-04-05 05:11:45 +08:00
NULL ,
GIMP_PARAM_READWRITE ) ) ;
gimp_procedure_add_return_value ( procedure ,
gimp_param_spec_int32 ( " width " ,
" width " ,
" The brush width " ,
G_MININT32 , G_MAXINT32 , 0 ,
GIMP_PARAM_READWRITE ) ) ;
gimp_procedure_add_return_value ( procedure ,
gimp_param_spec_int32 ( " height " ,
" height " ,
" The brush height " ,
G_MININT32 , G_MAXINT32 , 0 ,
GIMP_PARAM_READWRITE ) ) ;
gimp_procedure_add_return_value ( procedure ,
gimp_param_spec_int32 ( " mask-bpp " ,
" mask bpp " ,
" The brush mask bpp " ,
G_MININT32 , G_MAXINT32 , 0 ,
GIMP_PARAM_READWRITE ) ) ;
gimp_procedure_add_return_value ( procedure ,
gimp_param_spec_int32 ( " color-bpp " ,
" color bpp " ,
" The brush color bpp " ,
G_MININT32 , G_MAXINT32 , 0 ,
GIMP_PARAM_READWRITE ) ) ;
2006-04-26 17:13:47 +08:00
gimp_pdb_register_procedure ( pdb , procedure ) ;
2006-04-07 16:16:26 +08:00
g_object_unref ( procedure ) ;
2004-12-31 07:28:38 +08:00
2006-04-05 05:11:45 +08:00
/*
* gimp - brush - get - pixels
*/
2006-04-06 18:01:30 +08:00
procedure = gimp_procedure_new ( brush_get_pixels_invoker ) ;
2008-04-04 18:58:56 +08:00
gimp_object_set_static_name ( GIMP_OBJECT ( procedure ) ,
" gimp-brush-get-pixels " ) ;
2006-04-05 05:11:45 +08:00
gimp_procedure_set_static_strings ( procedure ,
" gimp-brush-get-pixels " ,
" Retrieve information about the specified brush. " ,
" This procedure retrieves information about the specified brush. This includes the brush extents (width and height) and its pixels data. " ,
" Michael Natterer <mitch@gimp.org> " ,
" Michael Natterer " ,
" 2004 " ,
NULL ) ;
gimp_procedure_add_argument ( procedure ,
gimp_param_spec_string ( " name " ,
" name " ,
" The brush name " ,
2007-12-11 17:54:41 +08:00
FALSE , FALSE , TRUE ,
2006-04-05 05:11:45 +08:00
NULL ,
GIMP_PARAM_READWRITE ) ) ;
gimp_procedure_add_return_value ( procedure ,
gimp_param_spec_int32 ( " width " ,
" width " ,
" The brush width " ,
G_MININT32 , G_MAXINT32 , 0 ,
GIMP_PARAM_READWRITE ) ) ;
gimp_procedure_add_return_value ( procedure ,
gimp_param_spec_int32 ( " height " ,
" height " ,
" The brush height " ,
G_MININT32 , G_MAXINT32 , 0 ,
GIMP_PARAM_READWRITE ) ) ;
gimp_procedure_add_return_value ( procedure ,
gimp_param_spec_int32 ( " mask-bpp " ,
" mask bpp " ,
" The brush mask bpp " ,
G_MININT32 , G_MAXINT32 , 0 ,
GIMP_PARAM_READWRITE ) ) ;
gimp_procedure_add_return_value ( procedure ,
gimp_param_spec_int32 ( " num-mask-bytes " ,
" num mask bytes " ,
" Length of brush mask data " ,
0 , G_MAXINT32 , 0 ,
GIMP_PARAM_READWRITE ) ) ;
gimp_procedure_add_return_value ( procedure ,
gimp_param_spec_int8_array ( " mask-bytes " ,
" mask bytes " ,
" The brush mask data " ,
GIMP_PARAM_READWRITE ) ) ;
gimp_procedure_add_return_value ( procedure ,
gimp_param_spec_int32 ( " color-bpp " ,
" color bpp " ,
" The brush color bpp " ,
G_MININT32 , G_MAXINT32 , 0 ,
GIMP_PARAM_READWRITE ) ) ;
gimp_procedure_add_return_value ( procedure ,
gimp_param_spec_int32 ( " num-color-bytes " ,
" num color bytes " ,
" Length of brush color data " ,
0 , G_MAXINT32 , 0 ,
GIMP_PARAM_READWRITE ) ) ;
gimp_procedure_add_return_value ( procedure ,
gimp_param_spec_int8_array ( " color-bytes " ,
" color bytes " ,
" The brush color data " ,
GIMP_PARAM_READWRITE ) ) ;
2006-04-26 17:13:47 +08:00
gimp_pdb_register_procedure ( pdb , procedure ) ;
2006-04-07 16:16:26 +08:00
g_object_unref ( procedure ) ;
2004-12-31 07:28:38 +08:00
2006-04-05 05:11:45 +08:00
/*
* gimp - brush - get - spacing
*/
2006-04-06 18:01:30 +08:00
procedure = gimp_procedure_new ( brush_get_spacing_invoker ) ;
2008-04-04 18:58:56 +08:00
gimp_object_set_static_name ( GIMP_OBJECT ( procedure ) ,
" gimp-brush-get-spacing " ) ;
2006-04-05 05:11:45 +08:00
gimp_procedure_set_static_strings ( procedure ,
" gimp-brush-get-spacing " ,
" Get the brush spacing. " ,
" This procedure returns the spacing setting for the specified brush. The return value is an integer between 0 and 1000 which represents percentage of the maximum of the width and height of the mask. " ,
" Michael Natterer <mitch@gimp.org> " ,
" Michael Natterer " ,
" 2004 " ,
NULL ) ;
gimp_procedure_add_argument ( procedure ,
gimp_param_spec_string ( " name " ,
" name " ,
" The brush name " ,
2007-12-11 17:54:41 +08:00
FALSE , FALSE , TRUE ,
2006-04-05 05:11:45 +08:00
NULL ,
GIMP_PARAM_READWRITE ) ) ;
gimp_procedure_add_return_value ( procedure ,
gimp_param_spec_int32 ( " spacing " ,
" spacing " ,
2006-05-19 01:25:15 +08:00
" The brush spacing " ,
2006-04-05 05:11:45 +08:00
0 , 1000 , 0 ,
GIMP_PARAM_READWRITE ) ) ;
2006-04-26 17:13:47 +08:00
gimp_pdb_register_procedure ( pdb , procedure ) ;
2006-04-07 16:16:26 +08:00
g_object_unref ( procedure ) ;
2004-12-31 07:28:38 +08:00
2006-04-05 05:11:45 +08:00
/*
* gimp - brush - set - spacing
*/
2006-04-06 18:01:30 +08:00
procedure = gimp_procedure_new ( brush_set_spacing_invoker ) ;
2008-04-04 18:58:56 +08:00
gimp_object_set_static_name ( GIMP_OBJECT ( procedure ) ,
" gimp-brush-set-spacing " ) ;
2006-04-05 05:11:45 +08:00
gimp_procedure_set_static_strings ( procedure ,
" gimp-brush-set-spacing " ,
" Set the brush spacing. " ,
" This procedure modifies the spacing setting for the specified brush. The value should be a integer between 0 and 1000. " ,
" Bill Skaggs <weskaggs@primate.ucdavis.edu> " ,
" Bill Skaggs " ,
" 2004 " ,
NULL ) ;
gimp_procedure_add_argument ( procedure ,
gimp_param_spec_string ( " name " ,
" name " ,
" The brush name " ,
2007-12-11 17:54:41 +08:00
FALSE , FALSE , TRUE ,
2006-04-05 05:11:45 +08:00
NULL ,
GIMP_PARAM_READWRITE ) ) ;
gimp_procedure_add_argument ( procedure ,
gimp_param_spec_int32 ( " spacing " ,
" spacing " ,
2006-05-19 01:25:15 +08:00
" The brush spacing " ,
2006-04-05 05:11:45 +08:00
0 , 1000 , 0 ,
GIMP_PARAM_READWRITE ) ) ;
2006-04-26 17:13:47 +08:00
gimp_pdb_register_procedure ( pdb , procedure ) ;
2006-04-07 16:16:26 +08:00
g_object_unref ( procedure ) ;
2004-12-31 07:28:38 +08:00
2006-04-05 05:11:45 +08:00
/*
* gimp - brush - get - shape
*/
2006-04-06 18:01:30 +08:00
procedure = gimp_procedure_new ( brush_get_shape_invoker ) ;
2008-04-04 18:58:56 +08:00
gimp_object_set_static_name ( GIMP_OBJECT ( procedure ) ,
" gimp-brush-get-shape " ) ;
2006-04-05 05:11:45 +08:00
gimp_procedure_set_static_strings ( procedure ,
" gimp-brush-get-shape " ,
" Get the shape of a generated brush. " ,
" This procedure gets the shape value for a generated brush. If called for any other type of brush, it does not succeed. The current possibilities are Circle (GIMP_BRUSH_GENERATED_CIRCLE), Square (GIMP_BRUSH_GENERATED_SQUARE), and Diamond (GIMP_BRUSH_GENERATED_DIAMOND). Other shapes are likely to be added in the future. " ,
" Bill Skaggs <weskaggs@primate.ucdavis.edu> " ,
" Bill Skaggs " ,
" 2004 " ,
NULL ) ;
gimp_procedure_add_argument ( procedure ,
gimp_param_spec_string ( " name " ,
" name " ,
" The brush name " ,
2007-12-11 17:54:41 +08:00
FALSE , FALSE , TRUE ,
2006-04-05 05:11:45 +08:00
NULL ,
GIMP_PARAM_READWRITE ) ) ;
gimp_procedure_add_return_value ( procedure ,
g_param_spec_enum ( " shape " ,
" shape " ,
2006-05-19 01:25:15 +08:00
" The brush shape " ,
2006-04-05 05:11:45 +08:00
GIMP_TYPE_BRUSH_GENERATED_SHAPE ,
GIMP_BRUSH_GENERATED_CIRCLE ,
GIMP_PARAM_READWRITE ) ) ;
2006-04-26 17:13:47 +08:00
gimp_pdb_register_procedure ( pdb , procedure ) ;
2006-04-07 16:16:26 +08:00
g_object_unref ( procedure ) ;
2004-12-31 07:28:38 +08:00
2006-04-05 05:11:45 +08:00
/*
2008-02-08 01:08:54 +08:00
* gimp - brush - set - shape
2006-04-05 05:11:45 +08:00
*/
2008-02-08 01:08:54 +08:00
procedure = gimp_procedure_new ( brush_set_shape_invoker ) ;
2008-04-04 18:58:56 +08:00
gimp_object_set_static_name ( GIMP_OBJECT ( procedure ) ,
" gimp-brush-set-shape " ) ;
2006-04-05 05:11:45 +08:00
gimp_procedure_set_static_strings ( procedure ,
2008-02-08 01:08:54 +08:00
" gimp-brush-set-shape " ,
" Set the shape of a generated brush. " ,
" This procedure sets the shape value for a generated brush. If called for any other type of brush, it does not succeed. The current possibilities are Circle (GIMP_BRUSH_GENERATED_CIRCLE), Square (GIMP_BRUSH_GENERATED_SQUARE), and Diamond (GIMP_BRUSH_GENERATED_DIAMOND). Other shapes are likely to be added in the future. " ,
2006-04-05 05:11:45 +08:00
" Bill Skaggs <weskaggs@primate.ucdavis.edu> " ,
" Bill Skaggs " ,
" 2004 " ,
NULL ) ;
gimp_procedure_add_argument ( procedure ,
gimp_param_spec_string ( " name " ,
" name " ,
" The brush name " ,
2007-12-11 17:54:41 +08:00
FALSE , FALSE , TRUE ,
2006-04-05 05:11:45 +08:00
NULL ,
GIMP_PARAM_READWRITE ) ) ;
2008-02-08 01:08:54 +08:00
gimp_procedure_add_argument ( procedure ,
g_param_spec_enum ( " shape-in " ,
" shape in " ,
" The brush shape " ,
GIMP_TYPE_BRUSH_GENERATED_SHAPE ,
GIMP_BRUSH_GENERATED_CIRCLE ,
GIMP_PARAM_READWRITE ) ) ;
2006-04-05 05:11:45 +08:00
gimp_procedure_add_return_value ( procedure ,
2008-02-08 01:08:54 +08:00
g_param_spec_enum ( " shape-out " ,
" shape out " ,
" The brush shape actually assigned " ,
GIMP_TYPE_BRUSH_GENERATED_SHAPE ,
GIMP_BRUSH_GENERATED_CIRCLE ,
GIMP_PARAM_READWRITE ) ) ;
2006-04-26 17:13:47 +08:00
gimp_pdb_register_procedure ( pdb , procedure ) ;
2006-04-07 16:16:26 +08:00
g_object_unref ( procedure ) ;
2004-12-31 07:28:38 +08:00
2006-04-05 05:11:45 +08:00
/*
2008-02-08 01:08:54 +08:00
* gimp - brush - get - radius
2006-04-05 05:11:45 +08:00
*/
2008-02-08 01:08:54 +08:00
procedure = gimp_procedure_new ( brush_get_radius_invoker ) ;
2008-04-04 18:58:56 +08:00
gimp_object_set_static_name ( GIMP_OBJECT ( procedure ) ,
" gimp-brush-get-radius " ) ;
2006-04-05 05:11:45 +08:00
gimp_procedure_set_static_strings ( procedure ,
2008-02-08 01:08:54 +08:00
" gimp-brush-get-radius " ,
" Get the radius of a generated brush. " ,
" This procedure gets the radius value for a generated brush. If called for any other type of brush, it does not succeed. " ,
2006-04-05 05:11:45 +08:00
" Bill Skaggs <weskaggs@primate.ucdavis.edu> " ,
" Bill Skaggs " ,
" 2004 " ,
NULL ) ;
gimp_procedure_add_argument ( procedure ,
gimp_param_spec_string ( " name " ,
" name " ,
" The brush name " ,
2007-12-11 17:54:41 +08:00
FALSE , FALSE , TRUE ,
2006-04-05 05:11:45 +08:00
NULL ,
GIMP_PARAM_READWRITE ) ) ;
gimp_procedure_add_return_value ( procedure ,
2008-02-08 01:08:54 +08:00
g_param_spec_double ( " radius " ,
" radius " ,
" The radius of the brush in pixels " ,
- G_MAXDOUBLE , G_MAXDOUBLE , 0 ,
GIMP_PARAM_READWRITE ) ) ;
2006-04-26 17:13:47 +08:00
gimp_pdb_register_procedure ( pdb , procedure ) ;
2006-04-07 16:16:26 +08:00
g_object_unref ( procedure ) ;
2004-12-31 07:28:38 +08:00
2006-04-05 05:11:45 +08:00
/*
2008-02-08 01:08:54 +08:00
* gimp - brush - set - radius
2006-04-05 05:11:45 +08:00
*/
2008-02-08 01:08:54 +08:00
procedure = gimp_procedure_new ( brush_set_radius_invoker ) ;
2008-04-04 18:58:56 +08:00
gimp_object_set_static_name ( GIMP_OBJECT ( procedure ) ,
" gimp-brush-set-radius " ) ;
2006-04-05 05:11:45 +08:00
gimp_procedure_set_static_strings ( procedure ,
2008-02-08 01:08:54 +08:00
" gimp-brush-set-radius " ,
" Set the radius of a generated brush. " ,
" This procedure sets the radius for a generated brush. If called for any other type of brush, it does not succeed. " ,
2006-04-05 05:11:45 +08:00
" Bill Skaggs <weskaggs@primate.ucdavis.edu> " ,
" Bill Skaggs " ,
" 2004 " ,
NULL ) ;
gimp_procedure_add_argument ( procedure ,
gimp_param_spec_string ( " name " ,
" name " ,
" The brush name " ,
2007-12-11 17:54:41 +08:00
FALSE , FALSE , TRUE ,
2006-04-05 05:11:45 +08:00
NULL ,
GIMP_PARAM_READWRITE ) ) ;
2008-02-08 01:08:54 +08:00
gimp_procedure_add_argument ( procedure ,
g_param_spec_double ( " radius-in " ,
" radius in " ,
" The desired brush radius " ,
- G_MAXDOUBLE , G_MAXDOUBLE , 0 ,
GIMP_PARAM_READWRITE ) ) ;
2006-04-05 05:11:45 +08:00
gimp_procedure_add_return_value ( procedure ,
2008-02-08 01:08:54 +08:00
g_param_spec_double ( " radius-out " ,
" radius out " ,
" The brush radius actually assigned " ,
2006-04-05 05:11:45 +08:00
- G_MAXDOUBLE , G_MAXDOUBLE , 0 ,
GIMP_PARAM_READWRITE ) ) ;
2006-04-26 17:13:47 +08:00
gimp_pdb_register_procedure ( pdb , procedure ) ;
2006-04-07 16:16:26 +08:00
g_object_unref ( procedure ) ;
2004-12-31 07:28:38 +08:00
2006-04-05 05:11:45 +08:00
/*
2008-02-08 01:08:54 +08:00
* gimp - brush - get - spikes
2006-04-05 05:11:45 +08:00
*/
2008-02-08 01:08:54 +08:00
procedure = gimp_procedure_new ( brush_get_spikes_invoker ) ;
2008-04-04 18:58:56 +08:00
gimp_object_set_static_name ( GIMP_OBJECT ( procedure ) ,
" gimp-brush-get-spikes " ) ;
2006-04-05 05:11:45 +08:00
gimp_procedure_set_static_strings ( procedure ,
2008-02-08 01:08:54 +08:00
" gimp-brush-get-spikes " ,
" Get the number of spikes for a generated brush. " ,
" This procedure gets the number of spikes for a generated brush. If called for any other type of brush, it does not succeed. " ,
2006-04-05 05:11:45 +08:00
" Bill Skaggs <weskaggs@primate.ucdavis.edu> " ,
" Bill Skaggs " ,
" 2004 " ,
NULL ) ;
gimp_procedure_add_argument ( procedure ,
gimp_param_spec_string ( " name " ,
" name " ,
" The brush name " ,
2007-12-11 17:54:41 +08:00
FALSE , FALSE , TRUE ,
2006-04-05 05:11:45 +08:00
NULL ,
GIMP_PARAM_READWRITE ) ) ;
gimp_procedure_add_return_value ( procedure ,
2008-02-08 01:08:54 +08:00
gimp_param_spec_int32 ( " spikes " ,
" spikes " ,
" The number of spikes on the brush. " ,
G_MININT32 , G_MAXINT32 , 0 ,
GIMP_PARAM_READWRITE ) ) ;
2006-04-26 17:13:47 +08:00
gimp_pdb_register_procedure ( pdb , procedure ) ;
2006-04-07 16:16:26 +08:00
g_object_unref ( procedure ) ;
2004-12-31 07:28:38 +08:00
2006-04-05 05:11:45 +08:00
/*
2008-02-08 01:08:54 +08:00
* gimp - brush - set - spikes
2006-04-05 05:11:45 +08:00
*/
2008-02-08 01:08:54 +08:00
procedure = gimp_procedure_new ( brush_set_spikes_invoker ) ;
2008-04-04 18:58:56 +08:00
gimp_object_set_static_name ( GIMP_OBJECT ( procedure ) ,
" gimp-brush-set-spikes " ) ;
2006-04-05 05:11:45 +08:00
gimp_procedure_set_static_strings ( procedure ,
2008-02-08 01:08:54 +08:00
" gimp-brush-set-spikes " ,
" Set the number of spikes for a generated brush. " ,
" This procedure sets the number of spikes for a generated brush. If called for any other type of brush, it does not succeed. " ,
2006-04-05 05:11:45 +08:00
" Bill Skaggs <weskaggs@primate.ucdavis.edu> " ,
" Bill Skaggs " ,
" 2004 " ,
NULL ) ;
gimp_procedure_add_argument ( procedure ,
gimp_param_spec_string ( " name " ,
" name " ,
" The brush name " ,
2007-12-11 17:54:41 +08:00
FALSE , FALSE , TRUE ,
2006-04-05 05:11:45 +08:00
NULL ,
GIMP_PARAM_READWRITE ) ) ;
2008-02-08 01:08:54 +08:00
gimp_procedure_add_argument ( procedure ,
gimp_param_spec_int32 ( " spikes-in " ,
" spikes in " ,
" The desired number of spikes " ,
G_MININT32 , G_MAXINT32 , 0 ,
GIMP_PARAM_READWRITE ) ) ;
2006-04-05 05:11:45 +08:00
gimp_procedure_add_return_value ( procedure ,
2008-02-08 01:08:54 +08:00
gimp_param_spec_int32 ( " spikes-out " ,
" spikes out " ,
" The number of spikes actually assigned " ,
G_MININT32 , G_MAXINT32 , 0 ,
GIMP_PARAM_READWRITE ) ) ;
2006-04-26 17:13:47 +08:00
gimp_pdb_register_procedure ( pdb , procedure ) ;
2006-04-07 16:16:26 +08:00
g_object_unref ( procedure ) ;
2004-12-31 07:28:38 +08:00
2006-04-05 05:11:45 +08:00
/*
2008-02-08 01:08:54 +08:00
* gimp - brush - get - hardness
2006-04-05 05:11:45 +08:00
*/
2008-02-08 01:08:54 +08:00
procedure = gimp_procedure_new ( brush_get_hardness_invoker ) ;
2008-04-04 18:58:56 +08:00
gimp_object_set_static_name ( GIMP_OBJECT ( procedure ) ,
" gimp-brush-get-hardness " ) ;
2006-04-05 05:11:45 +08:00
gimp_procedure_set_static_strings ( procedure ,
2008-02-08 01:08:54 +08:00
" gimp-brush-get-hardness " ,
" Get the hardness of a generated brush. " ,
" This procedure gets the hardness of a generated brush. The hardness of a brush is the amount its intensity fades at the outside edge. If called for any other type of brush, the function does not succeed. " ,
2006-04-05 05:11:45 +08:00
" Bill Skaggs <weskaggs@primate.ucdavis.edu> " ,
" Bill Skaggs " ,
" 2004 " ,
NULL ) ;
gimp_procedure_add_argument ( procedure ,
gimp_param_spec_string ( " name " ,
" name " ,
" The brush name " ,
2007-12-11 17:54:41 +08:00
FALSE , FALSE , TRUE ,
2006-04-05 05:11:45 +08:00
NULL ,
GIMP_PARAM_READWRITE ) ) ;
gimp_procedure_add_return_value ( procedure ,
2008-02-08 01:08:54 +08:00
g_param_spec_double ( " hardness " ,
" hardness " ,
" The hardness of the brush. " ,
- G_MAXDOUBLE , G_MAXDOUBLE , 0 ,
GIMP_PARAM_READWRITE ) ) ;
2006-04-26 17:13:47 +08:00
gimp_pdb_register_procedure ( pdb , procedure ) ;
2006-04-07 16:16:26 +08:00
g_object_unref ( procedure ) ;
2004-12-31 07:28:38 +08:00
2006-04-05 05:11:45 +08:00
/*
2008-02-08 01:08:54 +08:00
* gimp - brush - set - hardness
2006-04-05 05:11:45 +08:00
*/
2008-02-08 01:08:54 +08:00
procedure = gimp_procedure_new ( brush_set_hardness_invoker ) ;
2008-04-04 18:58:56 +08:00
gimp_object_set_static_name ( GIMP_OBJECT ( procedure ) ,
" gimp-brush-set-hardness " ) ;
2006-04-05 05:11:45 +08:00
gimp_procedure_set_static_strings ( procedure ,
2008-02-08 01:08:54 +08:00
" gimp-brush-set-hardness " ,
" Set the hardness of a generated brush. " ,
" This procedure sets the hardness for a generated brush. If called for any other type of brush, it does not succeed. " ,
2006-04-05 05:11:45 +08:00
" Bill Skaggs <weskaggs@primate.ucdavis.edu> " ,
" Bill Skaggs " ,
" 2004 " ,
NULL ) ;
gimp_procedure_add_argument ( procedure ,
gimp_param_spec_string ( " name " ,
" name " ,
" The brush name " ,
2007-12-11 17:54:41 +08:00
FALSE , FALSE , TRUE ,
2006-04-05 05:11:45 +08:00
NULL ,
GIMP_PARAM_READWRITE ) ) ;
gimp_procedure_add_argument ( procedure ,
2008-02-08 01:08:54 +08:00
g_param_spec_double ( " hardness-in " ,
" hardness in " ,
" The desired brush hardness " ,
2006-04-05 05:11:45 +08:00
- G_MAXDOUBLE , G_MAXDOUBLE , 0 ,
GIMP_PARAM_READWRITE ) ) ;
gimp_procedure_add_return_value ( procedure ,
2008-02-08 01:08:54 +08:00
g_param_spec_double ( " hardness-out " ,
" hardness out " ,
" The brush hardness actually assigned " ,
2006-04-05 05:11:45 +08:00
- G_MAXDOUBLE , G_MAXDOUBLE , 0 ,
GIMP_PARAM_READWRITE ) ) ;
2006-04-26 17:13:47 +08:00
gimp_pdb_register_procedure ( pdb , procedure ) ;
2006-04-07 16:16:26 +08:00
g_object_unref ( procedure ) ;
2004-12-31 07:28:38 +08:00
2006-04-05 05:11:45 +08:00
/*
2008-02-08 01:08:54 +08:00
* gimp - brush - get - aspect - ratio
2006-04-05 05:11:45 +08:00
*/
2008-02-08 01:08:54 +08:00
procedure = gimp_procedure_new ( brush_get_aspect_ratio_invoker ) ;
2008-04-04 18:58:56 +08:00
gimp_object_set_static_name ( GIMP_OBJECT ( procedure ) ,
" gimp-brush-get-aspect-ratio " ) ;
2006-04-05 05:11:45 +08:00
gimp_procedure_set_static_strings ( procedure ,
2008-02-08 01:08:54 +08:00
" gimp-brush-get-aspect-ratio " ,
" Get the aspect ratio of a generated brush. " ,
" This procedure gets the aspect ratio of a generated brush. If called for any other type of brush, it does not succeed. " ,
2006-04-05 05:11:45 +08:00
" Bill Skaggs <weskaggs@primate.ucdavis.edu> " ,
" Bill Skaggs " ,
" 2004 " ,
NULL ) ;
gimp_procedure_add_argument ( procedure ,
gimp_param_spec_string ( " name " ,
" name " ,
" The brush name " ,
2007-12-11 17:54:41 +08:00
FALSE , FALSE , TRUE ,
2006-04-05 05:11:45 +08:00
NULL ,
GIMP_PARAM_READWRITE ) ) ;
gimp_procedure_add_return_value ( procedure ,
2008-02-08 01:08:54 +08:00
g_param_spec_double ( " aspect-ratio " ,
" aspect ratio " ,
" The aspect ratio of the brush. " ,
- G_MAXDOUBLE , G_MAXDOUBLE , 0 ,
GIMP_PARAM_READWRITE ) ) ;
2006-04-26 17:13:47 +08:00
gimp_pdb_register_procedure ( pdb , procedure ) ;
2006-04-07 16:16:26 +08:00
g_object_unref ( procedure ) ;
2004-12-31 07:28:38 +08:00
2006-04-05 05:11:45 +08:00
/*
2008-02-08 01:08:54 +08:00
* gimp - brush - set - aspect - ratio
2006-04-05 05:11:45 +08:00
*/
2008-02-08 01:08:54 +08:00
procedure = gimp_procedure_new ( brush_set_aspect_ratio_invoker ) ;
2008-04-04 18:58:56 +08:00
gimp_object_set_static_name ( GIMP_OBJECT ( procedure ) ,
" gimp-brush-set-aspect-ratio " ) ;
2006-04-05 05:11:45 +08:00
gimp_procedure_set_static_strings ( procedure ,
2008-02-08 01:08:54 +08:00
" gimp-brush-set-aspect-ratio " ,
" Set the aspect ratio of a generated brush. " ,
" This procedure sets the aspect ratio for a generated brush. If called for any other type of brush, it does not succeed. " ,
2006-04-05 05:11:45 +08:00
" Bill Skaggs <weskaggs@primate.ucdavis.edu> " ,
" Bill Skaggs " ,
" 2004 " ,
NULL ) ;
gimp_procedure_add_argument ( procedure ,
gimp_param_spec_string ( " name " ,
" name " ,
" The brush name " ,
2007-12-11 17:54:41 +08:00
FALSE , FALSE , TRUE ,
2006-04-05 05:11:45 +08:00
NULL ,
GIMP_PARAM_READWRITE ) ) ;
gimp_procedure_add_argument ( procedure ,
2008-02-08 01:08:54 +08:00
g_param_spec_double ( " aspect-ratio-in " ,
" aspect ratio in " ,
" The desired brush aspect ratio " ,
2006-04-05 05:11:45 +08:00
- G_MAXDOUBLE , G_MAXDOUBLE , 0 ,
GIMP_PARAM_READWRITE ) ) ;
gimp_procedure_add_return_value ( procedure ,
2008-02-08 01:08:54 +08:00
g_param_spec_double ( " aspect-ratio-out " ,
" aspect ratio out " ,
" The brush aspect ratio actually assigned " ,
2006-04-05 05:11:45 +08:00
- G_MAXDOUBLE , G_MAXDOUBLE , 0 ,
GIMP_PARAM_READWRITE ) ) ;
2006-04-26 17:13:47 +08:00
gimp_pdb_register_procedure ( pdb , procedure ) ;
2006-04-07 16:16:26 +08:00
g_object_unref ( procedure ) ;
2004-12-31 07:28:38 +08:00
2006-04-05 05:11:45 +08:00
/*
2008-02-08 01:08:54 +08:00
* gimp - brush - get - angle
2006-04-05 05:11:45 +08:00
*/
2008-02-08 01:08:54 +08:00
procedure = gimp_procedure_new ( brush_get_angle_invoker ) ;
2008-04-04 18:58:56 +08:00
gimp_object_set_static_name ( GIMP_OBJECT ( procedure ) ,
" gimp-brush-get-angle " ) ;
2006-04-05 05:11:45 +08:00
gimp_procedure_set_static_strings ( procedure ,
2008-02-08 01:08:54 +08:00
" gimp-brush-get-angle " ,
" Get the rotation angle of a generated brush. " ,
" This procedure gets the angle of rotation for a generated brush. If called for any other type of brush, it does not succeed. " ,
2006-04-05 05:11:45 +08:00
" Bill Skaggs <weskaggs@primate.ucdavis.edu> " ,
" Bill Skaggs " ,
" 2004 " ,
NULL ) ;
gimp_procedure_add_argument ( procedure ,
gimp_param_spec_string ( " name " ,
" name " ,
" The brush name " ,
2007-12-11 17:54:41 +08:00
FALSE , FALSE , TRUE ,
2006-04-05 05:11:45 +08:00
NULL ,
GIMP_PARAM_READWRITE ) ) ;
gimp_procedure_add_return_value ( procedure ,
2008-02-08 01:08:54 +08:00
g_param_spec_double ( " angle " ,
" angle " ,
" The rotation angle of the brush. " ,
2006-04-05 05:11:45 +08:00
- G_MAXDOUBLE , G_MAXDOUBLE , 0 ,
GIMP_PARAM_READWRITE ) ) ;
2006-04-26 17:13:47 +08:00
gimp_pdb_register_procedure ( pdb , procedure ) ;
2006-04-07 16:16:26 +08:00
g_object_unref ( procedure ) ;
2004-12-31 07:28:38 +08:00
2006-04-05 05:11:45 +08:00
/*
* gimp - brush - set - angle
*/
2006-04-06 18:01:30 +08:00
procedure = gimp_procedure_new ( brush_set_angle_invoker ) ;
2008-04-04 18:58:56 +08:00
gimp_object_set_static_name ( GIMP_OBJECT ( procedure ) ,
" gimp-brush-set-angle " ) ;
2006-04-05 05:11:45 +08:00
gimp_procedure_set_static_strings ( procedure ,
" gimp-brush-set-angle " ,
" Set the rotation angle of a generated brush. " ,
" This procedure sets the rotation angle for a generated brush. If called for any other type of brush, it does not succeed. " ,
" Bill Skaggs <weskaggs@primate.ucdavis.edu> " ,
" Bill Skaggs " ,
" 2004 " ,
NULL ) ;
gimp_procedure_add_argument ( procedure ,
gimp_param_spec_string ( " name " ,
" name " ,
" The brush name " ,
2007-12-11 17:54:41 +08:00
FALSE , FALSE , TRUE ,
2006-04-05 05:11:45 +08:00
NULL ,
GIMP_PARAM_READWRITE ) ) ;
gimp_procedure_add_argument ( procedure ,
g_param_spec_double ( " angle-in " ,
" angle in " ,
" The desired brush rotation angle " ,
- G_MAXDOUBLE , G_MAXDOUBLE , 0 ,
GIMP_PARAM_READWRITE ) ) ;
gimp_procedure_add_return_value ( procedure ,
g_param_spec_double ( " angle-out " ,
" angle out " ,
" The brush rotation angle actually assigned " ,
- G_MAXDOUBLE , G_MAXDOUBLE , 0 ,
GIMP_PARAM_READWRITE ) ) ;
2006-04-26 17:13:47 +08:00
gimp_pdb_register_procedure ( pdb , procedure ) ;
2006-04-07 16:16:26 +08:00
g_object_unref ( procedure ) ;
2004-12-31 07:28:38 +08:00
}