2004-09-29 06:01:21 +08:00
/* The GIMP -- an image manipulation program
* Copyright ( C ) 1995 - 2003 Spencer Kimball and Peter Mattis
*
* This program is free software ; you can redistribute it and / or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation ; either version 2 of the License , or
* ( 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
* along with this program ; if not , write to the Free Software
* Foundation , Inc . , 59 Temple Place - Suite 330 , Boston , MA 02111 - 1307 , USA .
*/
/* NOTE: This file is autogenerated by pdbgen.pl. */
# include "config.h"
# include <string.h>
# include <glib-object.h>
# include "pdb-types.h"
2006-04-26 17:13:47 +08:00
# include "gimppdb.h"
2006-03-31 17:15:08 +08:00
# include "gimpprocedure.h"
2006-03-29 03:58:00 +08:00
# include "core/gimpparamspecs.h"
2004-09-29 06:01:21 +08:00
# include "base/temp-buf.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"
# include "core/gimplist.h"
2006-04-04 18:30:58 +08:00
static GValueArray *
brush_new_invoker ( GimpProcedure * procedure ,
Gimp * gimp ,
GimpContext * context ,
GimpProgress * progress ,
const GValueArray * args )
2004-09-29 06:01:21 +08:00
{
gboolean success = TRUE ;
2006-04-04 18:30:58 +08:00
GValueArray * 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
2006-04-04 18:30:58 +08:00
name = g_value_get_string ( & args - > values [ 0 ] ) ;
2004-09-29 06:01:21 +08:00
if ( success )
{
2004-10-04 17:39:27 +08:00
if ( strlen ( name ) )
2006-03-15 20:49:25 +08:00
{
GimpData * data = gimp_data_factory_data_new ( gimp - > brush_factory , name ) ;
2004-10-04 17:39:27 +08:00
2006-03-15 20:49:25 +08:00
if ( data )
2006-03-25 05:57:47 +08:00
actual_name = g_strdup ( gimp_object_get_name ( GIMP_OBJECT ( data ) ) ) ;
2006-03-15 20:49:25 +08:00
else
success = FALSE ;
}
else
success = FALSE ;
2004-09-29 06:01:21 +08:00
}
2006-04-01 01:42:13 +08:00
return_vals = gimp_procedure_get_return_values ( procedure , success ) ;
2004-09-29 06:01:21 +08:00
if ( success )
2006-04-04 18:30:58 +08:00
g_value_take_string ( & return_vals - > values [ 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
}
2006-04-04 18:30:58 +08:00
static GValueArray *
brush_duplicate_invoker ( GimpProcedure * procedure ,
Gimp * gimp ,
GimpContext * context ,
GimpProgress * progress ,
const GValueArray * args )
2004-09-29 06:01:21 +08:00
{
gboolean success = TRUE ;
2006-04-04 18:30:58 +08:00
GValueArray * 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
2006-04-04 18:30:58 +08:00
name = g_value_get_string ( & args - > values [ 0 ] ) ;
2004-09-29 06:01:21 +08:00
if ( success )
{
2006-03-15 20:49:25 +08:00
GimpBrush * brush = ( GimpBrush * )
2004-10-06 07:28:17 +08:00
gimp_container_get_child_by_name ( gimp - > brush_factory - > container , name ) ;
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 )
2006-03-25 05:57:47 +08:00
copy_name = g_strdup ( gimp_object_get_name ( GIMP_OBJECT ( brush_copy ) ) ) ;
2006-03-15 20:49:25 +08:00
else
success = FALSE ;
2004-09-29 06:01:21 +08:00
}
else
success = FALSE ;
}
2006-04-01 01:42:13 +08:00
return_vals = gimp_procedure_get_return_values ( procedure , success ) ;
2004-09-29 06:01:21 +08:00
if ( success )
2006-04-04 18:30:58 +08:00
g_value_take_string ( & return_vals - > values [ 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
}
2006-04-04 18:30:58 +08:00
static GValueArray *
brush_is_generated_invoker ( GimpProcedure * procedure ,
Gimp * gimp ,
GimpContext * context ,
GimpProgress * progress ,
const GValueArray * args )
2004-12-31 07:28:38 +08:00
{
gboolean success = TRUE ;
2006-04-04 18:30:58 +08:00
GValueArray * 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
2006-04-04 18:30:58 +08:00
name = g_value_get_string ( & args - > values [ 0 ] ) ;
2004-12-31 07:28:38 +08:00
if ( success )
{
2006-03-15 20:49:25 +08:00
GimpBrush * brush = ( GimpBrush * )
2004-12-31 07:28:38 +08:00
gimp_container_get_child_by_name ( gimp - > brush_factory - > container , name ) ;
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 ;
}
2006-04-01 01:42:13 +08:00
return_vals = gimp_procedure_get_return_values ( procedure , success ) ;
2004-12-31 07:28:38 +08:00
if ( success )
2006-04-04 18:30:58 +08:00
g_value_set_boolean ( & return_vals - > values [ 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
}
2006-04-04 18:30:58 +08:00
static GValueArray *
brush_rename_invoker ( GimpProcedure * procedure ,
Gimp * gimp ,
GimpContext * context ,
GimpProgress * progress ,
const GValueArray * args )
2004-09-29 06:01:21 +08:00
{
gboolean success = TRUE ;
2006-04-04 18:30:58 +08:00
GValueArray * 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
2006-04-04 18:30:58 +08:00
name = g_value_get_string ( & args - > values [ 0 ] ) ;
new_name = g_value_get_string ( & args - > values [ 1 ] ) ;
2004-09-29 06:01:21 +08:00
if ( success )
{
2006-03-15 20:49:25 +08:00
GimpBrush * brush = ( GimpBrush * )
2004-10-06 07:28:17 +08:00
gimp_container_get_child_by_name ( gimp - > brush_factory - > container , name ) ;
2004-09-29 06:01:21 +08:00
if ( brush & & GIMP_DATA ( brush ) - > writable )
2006-03-15 20:49:25 +08:00
{
gimp_object_set_name ( GIMP_OBJECT ( brush ) , new_name ) ;
2006-03-25 05:57:47 +08:00
actual_name = g_strdup ( gimp_object_get_name ( GIMP_OBJECT ( brush ) ) ) ;
2006-03-15 20:49:25 +08:00
}
2004-09-29 06:01:21 +08:00
else
success = FALSE ;
}
2006-04-01 01:42:13 +08:00
return_vals = gimp_procedure_get_return_values ( procedure , success ) ;
2004-09-29 06:01:21 +08:00
if ( success )
2006-04-04 18:30:58 +08:00
g_value_take_string ( & return_vals - > values [ 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
}
2006-04-04 18:30:58 +08:00
static GValueArray *
brush_delete_invoker ( GimpProcedure * procedure ,
Gimp * gimp ,
GimpContext * context ,
GimpProgress * progress ,
const GValueArray * args )
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
2006-04-04 18:30:58 +08:00
name = g_value_get_string ( & args - > values [ 0 ] ) ;
2004-09-29 06:01:21 +08:00
if ( success )
{
2006-03-15 20:49:25 +08:00
GimpBrush * brush = ( GimpBrush * )
2004-10-06 07:28:17 +08:00
gimp_container_get_child_by_name ( gimp - > brush_factory - > container , name ) ;
2004-09-29 06:01:21 +08:00
if ( brush & & GIMP_DATA ( brush ) - > deletable )
{
GError * error = NULL ;
success = gimp_data_factory_data_delete ( gimp - > brush_factory ,
GIMP_DATA ( brush ) ,
TRUE , & error ) ;
if ( ! success )
{
g_message ( error - > message ) ;
g_clear_error ( & error ) ;
}
}
else
success = FALSE ;
}
2006-04-01 01:42:13 +08:00
return gimp_procedure_get_return_values ( procedure , success ) ;
2004-09-29 06:01:21 +08:00
}
2006-04-04 18:30:58 +08:00
static GValueArray *
brush_is_editable_invoker ( GimpProcedure * procedure ,
Gimp * gimp ,
GimpContext * context ,
GimpProgress * progress ,
const GValueArray * args )
2004-12-31 07:28:38 +08:00
{
gboolean success = TRUE ;
2006-04-04 18:30:58 +08:00
GValueArray * 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
2006-04-04 18:30:58 +08:00
name = g_value_get_string ( & args - > values [ 0 ] ) ;
2004-12-31 07:28:38 +08:00
if ( success )
{
2006-03-15 20:49:25 +08:00
GimpBrush * brush = ( GimpBrush * )
2004-12-31 07:28:38 +08:00
gimp_container_get_child_by_name ( gimp - > brush_factory - > container , name ) ;
if ( brush )
2006-03-15 20:49:25 +08:00
editable = GIMP_DATA ( brush ) - > writable ;
2004-12-31 07:28:38 +08:00
else
success = FALSE ;
}
2006-04-01 01:42:13 +08:00
return_vals = gimp_procedure_get_return_values ( procedure , success ) ;
2004-12-31 07:28:38 +08:00
if ( success )
2006-04-04 18:30:58 +08:00
g_value_set_boolean ( & return_vals - > values [ 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
}
2006-04-04 18:30:58 +08:00
static GValueArray *
brush_get_info_invoker ( GimpProcedure * procedure ,
Gimp * gimp ,
GimpContext * context ,
GimpProgress * progress ,
const GValueArray * args )
2004-09-29 06:01:21 +08:00
{
gboolean success = TRUE ;
2006-04-04 18:30:58 +08:00
GValueArray * 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
2006-04-04 18:30:58 +08:00
name = g_value_get_string ( & args - > values [ 0 ] ) ;
2004-09-29 06:01:21 +08:00
if ( success )
{
2006-03-15 20:49:25 +08:00
GimpBrush * brush = ( GimpBrush * )
2004-10-06 07:28:17 +08:00
gimp_container_get_child_by_name ( gimp - > brush_factory - > container , name ) ;
2004-09-29 06:01:21 +08:00
2006-03-15 20:49:25 +08:00
if ( brush )
{
width = brush - > mask - > width ;
height = brush - > mask - > height ;
mask_bpp = brush - > mask - > bytes ;
color_bpp = brush - > pixmap ? brush - > pixmap - > bytes : 0 ;
}
else
success = FALSE ;
2004-09-29 06:01:21 +08:00
}
2006-04-01 01:42:13 +08:00
return_vals = gimp_procedure_get_return_values ( procedure , success ) ;
2004-09-29 06:01:21 +08:00
if ( success )
{
2006-04-04 18:30:58 +08:00
g_value_set_int ( & return_vals - > values [ 1 ] , width ) ;
g_value_set_int ( & return_vals - > values [ 2 ] , height ) ;
g_value_set_int ( & return_vals - > values [ 3 ] , mask_bpp ) ;
g_value_set_int ( & return_vals - > values [ 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
}
2006-04-04 18:30:58 +08:00
static GValueArray *
brush_get_pixels_invoker ( GimpProcedure * procedure ,
Gimp * gimp ,
GimpContext * context ,
GimpProgress * progress ,
const GValueArray * args )
2004-10-06 07:28:17 +08:00
{
gboolean success = TRUE ;
2006-04-04 18:30:58 +08:00
GValueArray * 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
2006-04-04 18:30:58 +08:00
name = g_value_get_string ( & args - > values [ 0 ] ) ;
2004-10-06 07:28:17 +08:00
if ( success )
{
2006-03-15 20:49:25 +08:00
GimpBrush * brush = ( GimpBrush * )
2004-10-06 07:28:17 +08:00
gimp_container_get_child_by_name ( gimp - > brush_factory - > container , name ) ;
if ( brush )
{
2006-03-15 20:49:25 +08:00
width = brush - > mask - > width ;
height = brush - > mask - > height ;
2004-10-06 11:23:09 +08:00
mask_bpp = brush - > mask - > bytes ;
2004-10-06 07:28:17 +08:00
num_mask_bytes = brush - > mask - > height * brush - > mask - > width ;
mask_bytes = g_memdup ( temp_buf_data ( brush - > mask ) , num_mask_bytes ) ;
2004-10-06 11:23:09 +08:00
if ( brush - > pixmap )
{
color_bpp = brush - > pixmap - > bytes ;
num_color_bytes = brush - > pixmap - > height * brush - > pixmap - > width ;
color_bytes = g_memdup ( temp_buf_data ( brush - > pixmap ) ,
num_color_bytes ) ;
}
2004-10-06 07:28:17 +08:00
}
else
success = FALSE ;
}
2006-04-01 01:42:13 +08:00
return_vals = gimp_procedure_get_return_values ( procedure , success ) ;
2004-10-06 07:28:17 +08:00
if ( success )
{
2006-04-04 18:30:58 +08:00
g_value_set_int ( & return_vals - > values [ 1 ] , width ) ;
g_value_set_int ( & return_vals - > values [ 2 ] , height ) ;
g_value_set_int ( & return_vals - > values [ 3 ] , mask_bpp ) ;
g_value_set_int ( & return_vals - > values [ 4 ] , num_mask_bytes ) ;
gimp_value_take_int8array ( & return_vals - > values [ 5 ] , mask_bytes , num_mask_bytes ) ;
g_value_set_int ( & return_vals - > values [ 6 ] , color_bpp ) ;
g_value_set_int ( & return_vals - > values [ 7 ] , num_color_bytes ) ;
gimp_value_take_int8array ( & return_vals - > values [ 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
}
2006-04-04 18:30:58 +08:00
static GValueArray *
brush_get_spacing_invoker ( GimpProcedure * procedure ,
Gimp * gimp ,
GimpContext * context ,
GimpProgress * progress ,
const GValueArray * args )
2004-09-29 06:01:21 +08:00
{
gboolean success = TRUE ;
2006-04-04 18:30:58 +08:00
GValueArray * 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
2006-04-04 18:30:58 +08:00
name = g_value_get_string ( & args - > values [ 0 ] ) ;
2004-09-29 06:01:21 +08:00
if ( success )
{
2006-03-15 20:49:25 +08:00
GimpBrush * brush = ( GimpBrush * )
2004-10-06 07:28:17 +08:00
gimp_container_get_child_by_name ( gimp - > brush_factory - > container , name ) ;
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
}
2006-04-01 01:42:13 +08:00
return_vals = gimp_procedure_get_return_values ( procedure , success ) ;
2004-09-29 06:01:21 +08:00
if ( success )
2006-04-04 18:30:58 +08:00
g_value_set_int ( & return_vals - > values [ 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
}
2006-04-04 18:30:58 +08:00
static GValueArray *
brush_set_spacing_invoker ( GimpProcedure * procedure ,
Gimp * gimp ,
GimpContext * context ,
GimpProgress * progress ,
const GValueArray * args )
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 ;
2006-04-04 18:30:58 +08:00
name = g_value_get_string ( & args - > values [ 0 ] ) ;
spacing = g_value_get_int ( & args - > values [ 1 ] ) ;
2004-09-29 06:01:21 +08:00
if ( success )
{
2006-03-15 20:49:25 +08:00
GimpBrush * brush = ( GimpBrush * )
2004-10-06 07:28:17 +08:00
gimp_container_get_child_by_name ( gimp - > brush_factory - > container , name ) ;
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 ;
}
2006-04-05 05:11:45 +08:00
return gimp_procedure_get_return_values ( procedure , success ) ;
}
static GValueArray *
brush_get_shape_invoker ( GimpProcedure * procedure ,
Gimp * gimp ,
GimpContext * context ,
GimpProgress * progress ,
const GValueArray * args )
{
gboolean success = TRUE ;
GValueArray * return_vals ;
const gchar * name ;
gint32 shape = 0 ;
name = g_value_get_string ( & args - > values [ 0 ] ) ;
if ( success )
{
GimpBrush * brush = ( GimpBrush * )
gimp_container_get_child_by_name ( gimp - > brush_factory - > container , name ) ;
if ( GIMP_IS_BRUSH_GENERATED ( brush ) )
shape = GIMP_BRUSH_GENERATED ( brush ) - > shape ;
else
success = FALSE ;
}
return_vals = gimp_procedure_get_return_values ( procedure , success ) ;
if ( success )
g_value_set_enum ( & return_vals - > values [ 1 ] , shape ) ;
return return_vals ;
}
static GValueArray *
brush_get_radius_invoker ( GimpProcedure * procedure ,
Gimp * gimp ,
GimpContext * context ,
GimpProgress * progress ,
const GValueArray * args )
{
gboolean success = TRUE ;
GValueArray * return_vals ;
const gchar * name ;
gdouble radius = 0.0 ;
name = g_value_get_string ( & args - > values [ 0 ] ) ;
if ( success )
{
GimpBrush * brush = ( GimpBrush * )
gimp_container_get_child_by_name ( gimp - > brush_factory - > container , name ) ;
if ( GIMP_IS_BRUSH_GENERATED ( brush ) )
radius = GIMP_BRUSH_GENERATED ( brush ) - > radius ;
else
success = FALSE ;
}
return_vals = gimp_procedure_get_return_values ( procedure , success ) ;
if ( success )
g_value_set_double ( & return_vals - > values [ 1 ] , radius ) ;
return return_vals ;
}
static GValueArray *
brush_get_spikes_invoker ( GimpProcedure * procedure ,
Gimp * gimp ,
GimpContext * context ,
GimpProgress * progress ,
const GValueArray * args )
{
gboolean success = TRUE ;
GValueArray * return_vals ;
const gchar * name ;
gint32 spikes = 0 ;
name = g_value_get_string ( & args - > values [ 0 ] ) ;
if ( success )
{
GimpBrush * brush = ( GimpBrush * )
gimp_container_get_child_by_name ( gimp - > brush_factory - > container , name ) ;
if ( GIMP_IS_BRUSH_GENERATED ( brush ) )
spikes = GIMP_BRUSH_GENERATED ( brush ) - > spikes ;
else
success = FALSE ;
}
return_vals = gimp_procedure_get_return_values ( procedure , success ) ;
if ( success )
g_value_set_int ( & return_vals - > values [ 1 ] , spikes ) ;
return return_vals ;
}
static GValueArray *
brush_get_hardness_invoker ( GimpProcedure * procedure ,
Gimp * gimp ,
GimpContext * context ,
GimpProgress * progress ,
const GValueArray * args )
{
gboolean success = TRUE ;
GValueArray * return_vals ;
const gchar * name ;
gdouble hardness = 0.0 ;
name = g_value_get_string ( & args - > values [ 0 ] ) ;
if ( success )
{
GimpBrush * brush = ( GimpBrush * )
gimp_container_get_child_by_name ( gimp - > brush_factory - > container , name ) ;
if ( GIMP_IS_BRUSH_GENERATED ( brush ) )
hardness = GIMP_BRUSH_GENERATED ( brush ) - > hardness ;
else
success = FALSE ;
}
return_vals = gimp_procedure_get_return_values ( procedure , success ) ;
if ( success )
g_value_set_double ( & return_vals - > values [ 1 ] , hardness ) ;
return return_vals ;
}
static GValueArray *
brush_get_aspect_ratio_invoker ( GimpProcedure * procedure ,
Gimp * gimp ,
GimpContext * context ,
GimpProgress * progress ,
const GValueArray * args )
{
gboolean success = TRUE ;
GValueArray * return_vals ;
const gchar * name ;
gdouble aspect_ratio = 0.0 ;
name = g_value_get_string ( & args - > values [ 0 ] ) ;
if ( success )
{
GimpBrush * brush = ( GimpBrush * )
gimp_container_get_child_by_name ( gimp - > brush_factory - > container , name ) ;
if ( GIMP_IS_BRUSH_GENERATED ( brush ) )
aspect_ratio = GIMP_BRUSH_GENERATED ( brush ) - > aspect_ratio ;
else
success = FALSE ;
}
return_vals = gimp_procedure_get_return_values ( procedure , success ) ;
if ( success )
g_value_set_double ( & return_vals - > values [ 1 ] , aspect_ratio ) ;
return return_vals ;
}
static GValueArray *
brush_get_angle_invoker ( GimpProcedure * procedure ,
Gimp * gimp ,
GimpContext * context ,
GimpProgress * progress ,
const GValueArray * args )
{
gboolean success = TRUE ;
GValueArray * return_vals ;
const gchar * name ;
gdouble angle = 0.0 ;
name = g_value_get_string ( & args - > values [ 0 ] ) ;
if ( success )
{
GimpBrush * brush = ( GimpBrush * )
gimp_container_get_child_by_name ( gimp - > brush_factory - > container , name ) ;
if ( GIMP_IS_BRUSH_GENERATED ( brush ) )
angle = GIMP_BRUSH_GENERATED ( brush ) - > angle ;
else
success = FALSE ;
}
return_vals = gimp_procedure_get_return_values ( procedure , success ) ;
if ( success )
g_value_set_double ( & return_vals - > values [ 1 ] , angle ) ;
return return_vals ;
2004-09-29 06:01:21 +08:00
}
2006-04-04 18:30:58 +08:00
static GValueArray *
2006-04-05 05:11:45 +08:00
brush_set_shape_invoker ( GimpProcedure * procedure ,
2006-04-04 18:30:58 +08:00
Gimp * gimp ,
GimpContext * context ,
GimpProgress * progress ,
const GValueArray * args )
2004-12-31 07:28:38 +08:00
{
gboolean success = TRUE ;
2006-04-04 18:30:58 +08:00
GValueArray * return_vals ;
2006-04-03 00:03:32 +08:00
const gchar * name ;
2006-04-05 05:11:45 +08:00
gint32 shape_in ;
gint32 shape_out = 0 ;
2004-12-31 07:28:38 +08:00
2006-04-04 18:30:58 +08:00
name = g_value_get_string ( & args - > values [ 0 ] ) ;
2006-04-05 05:11:45 +08:00
shape_in = g_value_get_enum ( & args - > values [ 1 ] ) ;
2004-12-31 07:28:38 +08:00
if ( success )
{
2006-03-15 20:49:25 +08:00
GimpBrush * brush = ( GimpBrush * )
2004-12-31 07:28:38 +08:00
gimp_container_get_child_by_name ( gimp - > brush_factory - > container , name ) ;
2006-04-05 05:11:45 +08:00
if ( GIMP_IS_BRUSH_GENERATED ( brush ) & & GIMP_DATA ( brush ) - > writable )
{
gimp_brush_generated_set_shape ( GIMP_BRUSH_GENERATED ( brush ) ,
shape_in ) ;
shape_out = GIMP_BRUSH_GENERATED ( brush ) - > shape ;
}
2006-03-15 20:49:25 +08:00
else
success = FALSE ;
2004-12-31 07:28:38 +08:00
}
2006-04-01 01:42:13 +08:00
return_vals = gimp_procedure_get_return_values ( procedure , success ) ;
2004-12-31 07:28:38 +08:00
if ( success )
2006-04-05 05:11:45 +08:00
g_value_set_enum ( & return_vals - > values [ 1 ] , shape_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-04 18:30:58 +08:00
static GValueArray *
2006-04-05 05:11:45 +08:00
brush_set_radius_invoker ( GimpProcedure * procedure ,
2006-04-04 18:30:58 +08:00
Gimp * gimp ,
GimpContext * context ,
GimpProgress * progress ,
const GValueArray * args )
2004-12-31 07:28:38 +08:00
{
gboolean success = TRUE ;
2006-04-04 18:30:58 +08:00
GValueArray * return_vals ;
2006-04-03 00:03:32 +08:00
const gchar * name ;
2006-04-05 05:11:45 +08:00
gdouble radius_in ;
gdouble radius_out = 0.0 ;
2004-12-31 07:28:38 +08:00
2006-04-04 18:30:58 +08:00
name = g_value_get_string ( & args - > values [ 0 ] ) ;
2006-04-05 05:11:45 +08:00
radius_in = g_value_get_double ( & args - > values [ 1 ] ) ;
2004-12-31 07:28:38 +08:00
if ( success )
{
2006-03-15 20:49:25 +08:00
GimpBrush * brush = ( GimpBrush * )
2004-12-31 07:28:38 +08:00
gimp_container_get_child_by_name ( gimp - > brush_factory - > container , name ) ;
2006-04-05 05:11:45 +08:00
if ( GIMP_IS_BRUSH_GENERATED ( brush ) & & GIMP_DATA ( brush ) - > writable )
{
gimp_brush_generated_set_radius ( GIMP_BRUSH_GENERATED ( brush ) ,
radius_in ) ;
radius_out = GIMP_BRUSH_GENERATED ( brush ) - > radius ;
}
2006-03-15 20:49:25 +08:00
else
success = FALSE ;
2004-12-31 07:28:38 +08:00
}
2006-04-01 01:42:13 +08:00
return_vals = gimp_procedure_get_return_values ( procedure , success ) ;
2004-12-31 07:28:38 +08:00
if ( success )
2006-04-05 05:11:45 +08:00
g_value_set_double ( & return_vals - > values [ 1 ] , radius_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-04 18:30:58 +08:00
static GValueArray *
2006-04-05 05:11:45 +08:00
brush_set_spikes_invoker ( GimpProcedure * procedure ,
2006-04-04 18:30:58 +08:00
Gimp * gimp ,
GimpContext * context ,
GimpProgress * progress ,
const GValueArray * args )
2004-12-31 07:28:38 +08:00
{
gboolean success = TRUE ;
2006-04-04 18:30:58 +08:00
GValueArray * return_vals ;
2006-04-03 00:03:32 +08:00
const gchar * name ;
2006-04-05 05:11:45 +08:00
gint32 spikes_in ;
gint32 spikes_out = 0 ;
2004-12-31 07:28:38 +08:00
2006-04-04 18:30:58 +08:00
name = g_value_get_string ( & args - > values [ 0 ] ) ;
2006-04-05 05:11:45 +08:00
spikes_in = g_value_get_int ( & args - > values [ 1 ] ) ;
2004-12-31 07:28:38 +08:00
if ( success )
{
2006-03-15 20:49:25 +08:00
GimpBrush * brush = ( GimpBrush * )
2004-12-31 07:28:38 +08:00
gimp_container_get_child_by_name ( gimp - > brush_factory - > container , name ) ;
2006-04-05 05:11:45 +08:00
if ( GIMP_IS_BRUSH_GENERATED ( brush ) & & GIMP_DATA ( brush ) - > writable )
{
gimp_brush_generated_set_spikes ( GIMP_BRUSH_GENERATED ( brush ) ,
spikes_in ) ;
spikes_out = GIMP_BRUSH_GENERATED ( brush ) - > spikes ;
}
2006-03-15 20:49:25 +08:00
else
success = FALSE ;
2004-12-31 07:28:38 +08:00
}
2006-04-01 01:42:13 +08:00
return_vals = gimp_procedure_get_return_values ( procedure , success ) ;
2004-12-31 07:28:38 +08:00
if ( success )
2006-04-05 05:11:45 +08:00
g_value_set_int ( & return_vals - > values [ 1 ] , spikes_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-04 18:30:58 +08:00
static GValueArray *
2006-04-05 05:11:45 +08:00
brush_set_hardness_invoker ( GimpProcedure * procedure ,
2006-04-04 18:30:58 +08:00
Gimp * gimp ,
GimpContext * context ,
GimpProgress * progress ,
const GValueArray * args )
2004-12-31 07:28:38 +08:00
{
gboolean success = TRUE ;
2006-04-04 18:30:58 +08:00
GValueArray * return_vals ;
2006-04-03 00:03:32 +08:00
const gchar * name ;
2006-04-05 05:11:45 +08:00
gdouble hardness_in ;
gdouble hardness_out = 0.0 ;
2004-12-31 07:28:38 +08:00
2006-04-04 18:30:58 +08:00
name = g_value_get_string ( & args - > values [ 0 ] ) ;
2006-04-05 05:11:45 +08:00
hardness_in = g_value_get_double ( & args - > values [ 1 ] ) ;
2004-12-31 07:28:38 +08:00
if ( success )
{
2006-03-15 20:49:25 +08:00
GimpBrush * brush = ( GimpBrush * )
2004-12-31 07:28:38 +08:00
gimp_container_get_child_by_name ( gimp - > brush_factory - > container , name ) ;
2006-04-05 05:11:45 +08:00
if ( GIMP_IS_BRUSH_GENERATED ( brush ) & & GIMP_DATA ( brush ) - > writable )
{
gimp_brush_generated_set_hardness ( GIMP_BRUSH_GENERATED ( brush ) ,
hardness_in ) ;
hardness_out = GIMP_BRUSH_GENERATED ( brush ) - > hardness ;
}
2006-03-15 20:49:25 +08:00
else
success = FALSE ;
2004-12-31 07:28:38 +08:00
}
2006-04-01 01:42:13 +08:00
return_vals = gimp_procedure_get_return_values ( procedure , success ) ;
2004-12-31 07:28:38 +08:00
if ( success )
2006-04-05 05:11:45 +08:00
g_value_set_double ( & return_vals - > values [ 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
}
2006-04-04 18:30:58 +08:00
static GValueArray *
2006-04-05 05:11:45 +08:00
brush_set_aspect_ratio_invoker ( GimpProcedure * procedure ,
2006-04-04 18:30:58 +08:00
Gimp * gimp ,
GimpContext * context ,
GimpProgress * progress ,
const GValueArray * args )
2004-12-31 07:28:38 +08:00
{
gboolean success = TRUE ;
2006-04-04 18:30:58 +08:00
GValueArray * return_vals ;
2006-04-03 00:03:32 +08:00
const gchar * name ;
2006-04-05 05:11:45 +08:00
gdouble aspect_ratio_in ;
gdouble aspect_ratio_out = 0.0 ;
2004-12-31 07:28:38 +08:00
2006-04-04 18:30:58 +08:00
name = g_value_get_string ( & args - > values [ 0 ] ) ;
2006-04-05 05:11:45 +08:00
aspect_ratio_in = g_value_get_double ( & args - > values [ 1 ] ) ;
2004-12-31 07:28:38 +08:00
if ( success )
{
2006-03-15 20:49:25 +08:00
GimpBrush * brush = ( GimpBrush * )
2004-12-31 07:28:38 +08:00
gimp_container_get_child_by_name ( gimp - > brush_factory - > container , name ) ;
2006-04-05 05:11:45 +08:00
if ( GIMP_IS_BRUSH_GENERATED ( brush ) & & GIMP_DATA ( brush ) - > writable )
{
gimp_brush_generated_set_aspect_ratio ( GIMP_BRUSH_GENERATED ( brush ) ,
aspect_ratio_in ) ;
aspect_ratio_out = 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
}
2006-04-01 01:42:13 +08:00
return_vals = gimp_procedure_get_return_values ( procedure , success ) ;
2004-12-31 07:28:38 +08:00
if ( success )
2006-04-05 05:11:45 +08:00
g_value_set_double ( & return_vals - > values [ 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
}
2006-04-04 18:30:58 +08:00
static GValueArray *
2006-04-05 05:11:45 +08:00
brush_set_angle_invoker ( GimpProcedure * procedure ,
2006-04-04 18:30:58 +08:00
Gimp * gimp ,
GimpContext * context ,
GimpProgress * progress ,
const GValueArray * args )
2004-12-31 07:28:38 +08:00
{
gboolean success = TRUE ;
2006-04-04 18:30:58 +08:00
GValueArray * 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
2006-04-04 18:30:58 +08:00
name = g_value_get_string ( & args - > values [ 0 ] ) ;
2006-04-05 05:11:45 +08:00
angle_in = g_value_get_double ( & args - > values [ 1 ] ) ;
2004-12-31 07:28:38 +08:00
if ( success )
{
2006-03-15 20:49:25 +08:00
GimpBrush * brush = ( GimpBrush * )
2004-12-31 07:28:38 +08:00
gimp_container_get_child_by_name ( gimp - > brush_factory - > container , name ) ;
2006-04-05 05:11:45 +08:00
if ( GIMP_IS_BRUSH_GENERATED ( brush ) & & GIMP_DATA ( brush ) - > writable )
{
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
}
2006-04-01 01:42:13 +08:00
return_vals = gimp_procedure_get_return_values ( procedure , success ) ;
2004-12-31 07:28:38 +08:00
if ( success )
2006-04-05 05:11:45 +08:00
g_value_set_double ( & return_vals - > values [ 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 ) ;
2006-04-07 18:04:27 +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 " ,
FALSE , FALSE ,
NULL ,
GIMP_PARAM_READWRITE ) ) ;
gimp_procedure_add_return_value ( procedure ,
gimp_param_spec_string ( " actual-name " ,
" actual name " ,
" The actual new brush name " ,
FALSE , FALSE ,
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 ) ;
2006-04-07 18:04:27 +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 " ,
FALSE , FALSE ,
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 " ,
FALSE , FALSE ,
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 ) ;
2006-04-07 18:04:27 +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 " ,
FALSE , FALSE ,
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 ) ;
2006-04-07 18:04:27 +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 " ,
FALSE , FALSE ,
NULL ,
GIMP_PARAM_READWRITE ) ) ;
gimp_procedure_add_argument ( procedure ,
gimp_param_spec_string ( " new-name " ,
" new name " ,
" The new name of the brush " ,
FALSE , FALSE ,
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 " ,
FALSE , FALSE ,
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 ) ;
2006-04-07 18:04:27 +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 " ,
FALSE , FALSE ,
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 ) ;
2006-04-07 18:04:27 +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 " ,
FALSE , FALSE ,
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 ) ;
2006-04-07 18:04:27 +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 " ,
FALSE , FALSE ,
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 ) ;
2006-04-07 18:04:27 +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 " ,
FALSE , FALSE ,
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 ) ;
2006-04-07 18:04:27 +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 " ,
FALSE , FALSE ,
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 ) ;
2006-04-07 18:04:27 +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 " ,
FALSE , FALSE ,
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 ) ;
2006-04-07 18:04:27 +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 " ,
FALSE , FALSE ,
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
/*
* gimp - brush - get - radius
*/
2006-04-06 18:01:30 +08:00
procedure = gimp_procedure_new ( brush_get_radius_invoker ) ;
2006-04-07 18:04:27 +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 ,
" 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. " ,
" Bill Skaggs <weskaggs@primate.ucdavis.edu> " ,
" Bill Skaggs " ,
" 2004 " ,
NULL ) ;
gimp_procedure_add_argument ( procedure ,
gimp_param_spec_string ( " name " ,
" name " ,
" The brush name " ,
FALSE , FALSE ,
NULL ,
GIMP_PARAM_READWRITE ) ) ;
gimp_procedure_add_return_value ( procedure ,
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
/*
* gimp - brush - get - spikes
*/
2006-04-06 18:01:30 +08:00
procedure = gimp_procedure_new ( brush_get_spikes_invoker ) ;
2006-04-07 18:04:27 +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 ,
" 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. " ,
" Bill Skaggs <weskaggs@primate.ucdavis.edu> " ,
" Bill Skaggs " ,
" 2004 " ,
NULL ) ;
gimp_procedure_add_argument ( procedure ,
gimp_param_spec_string ( " name " ,
" name " ,
" The brush name " ,
FALSE , FALSE ,
NULL ,
GIMP_PARAM_READWRITE ) ) ;
gimp_procedure_add_return_value ( procedure ,
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
/*
* gimp - brush - get - hardness
*/
2006-04-06 18:01:30 +08:00
procedure = gimp_procedure_new ( brush_get_hardness_invoker ) ;
2006-04-07 18:04:27 +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 ,
" 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. " ,
" Bill Skaggs <weskaggs@primate.ucdavis.edu> " ,
" Bill Skaggs " ,
" 2004 " ,
NULL ) ;
gimp_procedure_add_argument ( procedure ,
gimp_param_spec_string ( " name " ,
" name " ,
" The brush name " ,
FALSE , FALSE ,
NULL ,
GIMP_PARAM_READWRITE ) ) ;
gimp_procedure_add_return_value ( procedure ,
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
/*
* gimp - brush - get - aspect - ratio
*/
2006-04-06 18:01:30 +08:00
procedure = gimp_procedure_new ( brush_get_aspect_ratio_invoker ) ;
2006-04-07 18:04:27 +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 ,
" 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. " ,
" Bill Skaggs <weskaggs@primate.ucdavis.edu> " ,
" Bill Skaggs " ,
" 2004 " ,
NULL ) ;
gimp_procedure_add_argument ( procedure ,
gimp_param_spec_string ( " name " ,
" name " ,
" The brush name " ,
FALSE , FALSE ,
NULL ,
GIMP_PARAM_READWRITE ) ) ;
gimp_procedure_add_return_value ( procedure ,
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
/*
* gimp - brush - get - angle
*/
2006-04-06 18:01:30 +08:00
procedure = gimp_procedure_new ( brush_get_angle_invoker ) ;
2006-04-07 18:04:27 +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 ,
" 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. " ,
" Bill Skaggs <weskaggs@primate.ucdavis.edu> " ,
" Bill Skaggs " ,
" 2004 " ,
NULL ) ;
gimp_procedure_add_argument ( procedure ,
gimp_param_spec_string ( " name " ,
" name " ,
" The brush name " ,
FALSE , FALSE ,
NULL ,
GIMP_PARAM_READWRITE ) ) ;
gimp_procedure_add_return_value ( procedure ,
g_param_spec_double ( " angle " ,
" angle " ,
" The rotation angle 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
/*
* gimp - brush - set - shape
*/
2006-04-06 18:01:30 +08:00
procedure = gimp_procedure_new ( brush_set_shape_invoker ) ;
2006-04-07 18:04:27 +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 ,
" 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. " ,
" Bill Skaggs <weskaggs@primate.ucdavis.edu> " ,
" Bill Skaggs " ,
" 2004 " ,
NULL ) ;
gimp_procedure_add_argument ( procedure ,
gimp_param_spec_string ( " name " ,
" name " ,
" The brush name " ,
FALSE , FALSE ,
NULL ,
GIMP_PARAM_READWRITE ) ) ;
gimp_procedure_add_argument ( procedure ,
g_param_spec_enum ( " shape-in " ,
" shape in " ,
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 ) ) ;
gimp_procedure_add_return_value ( procedure ,
g_param_spec_enum ( " shape-out " ,
" shape out " ,
2006-05-19 01:25:15 +08:00
" The brush shape actually assigned " ,
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
/*
* gimp - brush - set - radius
*/
2006-04-06 18:01:30 +08:00
procedure = gimp_procedure_new ( brush_set_radius_invoker ) ;
2006-04-07 18:04:27 +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 ,
" 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. " ,
" Bill Skaggs <weskaggs@primate.ucdavis.edu> " ,
" Bill Skaggs " ,
" 2004 " ,
NULL ) ;
gimp_procedure_add_argument ( procedure ,
gimp_param_spec_string ( " name " ,
" name " ,
" The brush name " ,
FALSE , FALSE ,
NULL ,
GIMP_PARAM_READWRITE ) ) ;
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 ) ) ;
gimp_procedure_add_return_value ( procedure ,
g_param_spec_double ( " radius-out " ,
" radius out " ,
" The brush radius 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
2006-04-05 05:11:45 +08:00
/*
* gimp - brush - set - spikes
*/
2006-04-06 18:01:30 +08:00
procedure = gimp_procedure_new ( brush_set_spikes_invoker ) ;
2006-04-07 18:04:27 +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 ,
" 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. " ,
" Bill Skaggs <weskaggs@primate.ucdavis.edu> " ,
" Bill Skaggs " ,
" 2004 " ,
NULL ) ;
gimp_procedure_add_argument ( procedure ,
gimp_param_spec_string ( " name " ,
" name " ,
" The brush name " ,
FALSE , FALSE ,
NULL ,
GIMP_PARAM_READWRITE ) ) ;
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 ) ) ;
gimp_procedure_add_return_value ( procedure ,
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
/*
* gimp - brush - set - hardness
*/
2006-04-06 18:01:30 +08:00
procedure = gimp_procedure_new ( brush_set_hardness_invoker ) ;
2006-04-07 18:04:27 +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 ,
" 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. " ,
" Bill Skaggs <weskaggs@primate.ucdavis.edu> " ,
" Bill Skaggs " ,
" 2004 " ,
NULL ) ;
gimp_procedure_add_argument ( procedure ,
gimp_param_spec_string ( " name " ,
" name " ,
" The brush name " ,
FALSE , FALSE ,
NULL ,
GIMP_PARAM_READWRITE ) ) ;
gimp_procedure_add_argument ( procedure ,
g_param_spec_double ( " hardness-in " ,
" hardness in " ,
" The desired brush hardness " ,
- G_MAXDOUBLE , G_MAXDOUBLE , 0 ,
GIMP_PARAM_READWRITE ) ) ;
gimp_procedure_add_return_value ( procedure ,
g_param_spec_double ( " hardness-out " ,
" hardness out " ,
" The brush hardness 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
2006-04-05 05:11:45 +08:00
/*
* gimp - brush - set - aspect - ratio
*/
2006-04-06 18:01:30 +08:00
procedure = gimp_procedure_new ( brush_set_aspect_ratio_invoker ) ;
2006-04-07 18:04:27 +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 ,
" 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. " ,
" Bill Skaggs <weskaggs@primate.ucdavis.edu> " ,
" Bill Skaggs " ,
" 2004 " ,
NULL ) ;
gimp_procedure_add_argument ( procedure ,
gimp_param_spec_string ( " name " ,
" name " ,
" The brush name " ,
FALSE , FALSE ,
NULL ,
GIMP_PARAM_READWRITE ) ) ;
gimp_procedure_add_argument ( procedure ,
g_param_spec_double ( " aspect-ratio-in " ,
" aspect ratio in " ,
" The desired brush aspect ratio " ,
- G_MAXDOUBLE , G_MAXDOUBLE , 0 ,
GIMP_PARAM_READWRITE ) ) ;
gimp_procedure_add_return_value ( procedure ,
g_param_spec_double ( " aspect-ratio-out " ,
" aspect ratio out " ,
" The brush aspect ratio 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
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 ) ;
2006-04-07 18:04:27 +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 " ,
FALSE , FALSE ,
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
}