1999-03-22 08:51:30 +08:00
/* The GIMP -- an image manipulation program
2003-07-03 08:47:26 +08:00
* Copyright ( C ) 1995 - 2003 Spencer Kimball and Peter Mattis
1999-03-22 08:51:30 +08:00
*
* 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 .
*/
1999-03-28 14:55:29 +08:00
/* NOTE: This file is autogenerated by pdbgen.pl. */
1999-03-22 08:51:30 +08:00
2000-12-29 23:22:01 +08:00
# include "config.h"
1999-03-22 08:51:30 +08:00
Win32 portability changes:
* config.h.win32, README.win32: Small changes.
* tools/pdbgen/pdb/*.pdb: Include <string.h>.
* app/*_cmds.c: Autogenerated files reflect above changes.
* libgimp/makefile.msc app/makefile.msc: Various updates,
including new object files. Gtk+ directory now should be called
gtk+ (not gtk-plus). Use win32-specific gdk subdir. Glib directory
now should be called just glib.
* libgimp/gimp.def: Updates.
* libgimp/gimpfeatures.h.win32: Made current with
gimpfeatures.h.in.
* libgimp/gimpfileselection.c: Define S_ISDIR and S_ISREG if
necessary.
* tools/pdbgen/pdb/fileops.pdb: Must have a
statement (even an empty one) after a label.
* app/fileops_cmds.c: Autogenerated file reflects above changes.
* app/crop.c: Include <string.h>.
* app/{app_procs,batch,fileops,datafiles,errorconsole,general,
plug_in,temp_buf,tile_swap}.c: Test NATIVE_WIN32, not
_MSC_VER. (NATIVE_WIN32 means we are using the Microsoft C
runtime, even if we might be compiling with gcc.)
* app/fileops.c: Don't include <process.h> here.
* app/fileops.h: Do include <process.h> here.
* app/gimpparasite.c: Include config.h, guard inclusion of
<unistd.h>. (Is the inclusion of unistd.h in source files all over
the place really necessary?)
* app/ink.c: MSC doesn't handle conversion from unsigned __int64
to double, so cast to signed.
* app/lut_funcs.c: Include config.h, and define rint() if necessary.
* app/pixel_processor.c: Include config.h without "..", like in
all the other places. Include <string.h>
* app/text_tool.c: Guard the "POINTS" identifier that clashes with
<windows.h>, sigh.
1999-05-05 05:32:17 +08:00
# include <string.h>
2003-05-16 05:15:00 +08:00
# include <glib-object.h>
2000-12-29 23:22:01 +08:00
2001-08-17 22:27:31 +08:00
# include "pdb-types.h"
2000-12-29 23:22:01 +08:00
# include "procedural_db.h"
2003-05-16 05:15:00 +08:00
# include "core/gimp.h"
2003-10-06 20:17:11 +08:00
# include "core/gimpchannel-select.h"
2001-05-09 10:32:03 +08:00
# include "core/gimpimage.h"
2003-05-16 05:15:00 +08:00
# include "core/gimplist.h"
2004-10-22 20:32:31 +08:00
# include "core/gimpstrokedesc.h"
2003-09-03 22:22:38 +08:00
# include "gimp-intl.h"
2003-05-16 05:15:00 +08:00
# include "vectors/gimpanchor.h"
# include "vectors/gimpbezierstroke.h"
2003-05-23 03:02:38 +08:00
# include "vectors/gimpvectors-compat.h"
2003-09-22 01:29:12 +08:00
# include "vectors/gimpvectors-import.h"
2003-05-16 05:15:00 +08:00
# include "vectors/gimpvectors.h"
1999-03-22 08:51:30 +08:00
1999-03-28 14:55:29 +08:00
static ProcRecord path_list_proc ;
static ProcRecord path_get_current_proc ;
static ProcRecord path_set_current_proc ;
2003-05-16 05:15:00 +08:00
static ProcRecord path_delete_proc ;
static ProcRecord path_get_points_proc ;
1999-03-28 14:55:29 +08:00
static ProcRecord path_set_points_proc ;
static ProcRecord path_stroke_current_proc ;
1999-04-06 07:33:50 +08:00
static ProcRecord path_get_point_at_dist_proc ;
static ProcRecord path_get_tattoo_proc ;
2003-05-16 05:15:00 +08:00
static ProcRecord path_set_tattoo_proc ;
1999-04-06 07:33:50 +08:00
static ProcRecord get_path_by_tattoo_proc ;
2000-02-02 12:14:23 +08:00
static ProcRecord path_get_locked_proc ;
static ProcRecord path_set_locked_proc ;
2003-07-09 21:18:56 +08:00
static ProcRecord path_to_selection_proc ;
2003-09-22 01:29:12 +08:00
static ProcRecord path_import_proc ;
2005-03-03 19:02:12 +08:00
static ProcRecord path_import_string_proc ;
1999-03-22 08:51:30 +08:00
1999-03-28 14:55:29 +08:00
void
2001-07-05 03:31:35 +08:00
register_paths_procs ( Gimp * gimp )
1999-03-28 14:55:29 +08:00
{
2001-07-05 03:31:35 +08:00
procedural_db_register ( gimp , & path_list_proc ) ;
procedural_db_register ( gimp , & path_get_current_proc ) ;
procedural_db_register ( gimp , & path_set_current_proc ) ;
2003-05-16 05:15:00 +08:00
procedural_db_register ( gimp , & path_delete_proc ) ;
procedural_db_register ( gimp , & path_get_points_proc ) ;
2001-07-05 03:31:35 +08:00
procedural_db_register ( gimp , & path_set_points_proc ) ;
procedural_db_register ( gimp , & path_stroke_current_proc ) ;
procedural_db_register ( gimp , & path_get_point_at_dist_proc ) ;
procedural_db_register ( gimp , & path_get_tattoo_proc ) ;
2003-05-16 05:15:00 +08:00
procedural_db_register ( gimp , & path_set_tattoo_proc ) ;
2001-07-05 03:31:35 +08:00
procedural_db_register ( gimp , & get_path_by_tattoo_proc ) ;
procedural_db_register ( gimp , & path_get_locked_proc ) ;
procedural_db_register ( gimp , & path_set_locked_proc ) ;
2003-07-09 21:18:56 +08:00
procedural_db_register ( gimp , & path_to_selection_proc ) ;
2003-09-22 01:29:12 +08:00
procedural_db_register ( gimp , & path_import_proc ) ;
2005-03-03 19:02:12 +08:00
procedural_db_register ( gimp , & path_import_string_proc ) ;
1999-03-28 14:55:29 +08:00
}
1999-03-22 08:51:30 +08:00
static Argument *
2006-03-28 03:32:19 +08:00
path_list_invoker ( ProcRecord * proc_record ,
Gimp * gimp ,
2004-08-11 02:47:21 +08:00
GimpContext * context ,
GimpProgress * progress ,
Argument * args )
1999-03-22 08:51:30 +08:00
{
1999-03-28 14:55:29 +08:00
gboolean success = TRUE ;
2006-03-28 05:09:32 +08:00
Argument * return_vals ;
2006-03-24 05:17:16 +08:00
GimpImage * image ;
2006-03-15 23:32:39 +08:00
gint32 num_paths = 0 ;
2003-09-05 01:57:27 +08:00
gchar * * path_list = NULL ;
1999-03-22 08:51:30 +08:00
2006-03-24 05:17:16 +08:00
image = gimp_image_get_by_ID ( gimp , args [ 0 ] . value . pdb_int ) ;
if ( ! GIMP_IS_IMAGE ( image ) )
1999-03-28 14:55:29 +08:00
success = FALSE ;
1999-03-22 08:51:30 +08:00
if ( success )
2006-03-22 17:58:08 +08:00
{
2006-03-24 05:17:16 +08:00
path_list = gimp_container_get_name_array ( image - > vectors , & num_paths ) ;
2006-03-22 17:58:08 +08:00
}
1999-03-22 08:51:30 +08:00
2006-03-28 05:09:32 +08:00
return_vals = procedural_db_return_values ( proc_record , success ) ;
1999-03-28 14:55:29 +08:00
if ( success )
{
2006-03-28 05:09:32 +08:00
return_vals [ 1 ] . value . pdb_int = num_paths ;
return_vals [ 2 ] . value . pdb_pointer = path_list ;
1999-03-28 14:55:29 +08:00
}
2006-03-28 05:09:32 +08:00
return return_vals ;
1999-03-22 08:51:30 +08:00
}
1999-03-28 14:55:29 +08:00
static ProcArg path_list_inargs [ ] =
1999-03-22 08:51:30 +08:00
{
1999-03-28 14:55:29 +08:00
{
2001-05-21 21:58:46 +08:00
GIMP_PDB_IMAGE ,
1999-03-22 08:51:30 +08:00
" image " ,
2006-03-24 05:17:16 +08:00
" The image to list the paths from "
1999-03-28 14:55:29 +08:00
}
1999-03-22 08:51:30 +08:00
} ;
1999-03-28 14:55:29 +08:00
static ProcArg path_list_outargs [ ] =
1999-03-22 08:51:30 +08:00
{
1999-03-28 14:55:29 +08:00
{
2001-05-21 21:58:46 +08:00
GIMP_PDB_INT32 ,
2005-08-06 02:19:09 +08:00
" num-paths " ,
2004-06-17 22:08:29 +08:00
" The number of paths returned. "
1999-03-22 08:51:30 +08:00
} ,
1999-03-28 14:55:29 +08:00
{
2001-05-21 21:58:46 +08:00
GIMP_PDB_STRINGARRAY ,
2005-08-06 02:19:09 +08:00
" path-list " ,
2004-06-17 22:08:29 +08:00
" List of the paths belonging to this image. "
1999-03-22 08:51:30 +08:00
}
} ;
1999-03-28 14:55:29 +08:00
static ProcRecord path_list_proc =
1999-03-22 08:51:30 +08:00
{
2005-08-03 06:52:23 +08:00
" gimp-path-list " ,
" gimp-path-list " ,
2006-03-22 20:15:06 +08:00
" This procedure is deprecated! Use 'gimp-image-get-vectors' instead. " ,
" This procedure is deprecated! Use 'gimp-image-get-vectors' instead. " ,
" " ,
" " ,
" " ,
" gimp-image-get-vectors " ,
2001-05-21 21:58:46 +08:00
GIMP_INTERNAL ,
1999-03-28 14:55:29 +08:00
1 ,
path_list_inargs ,
2 ,
path_list_outargs ,
{ { path_list_invoker } }
1999-03-22 08:51:30 +08:00
} ;
static Argument *
2006-03-28 03:32:19 +08:00
path_get_current_invoker ( ProcRecord * proc_record ,
Gimp * gimp ,
2004-08-11 02:47:21 +08:00
GimpContext * context ,
GimpProgress * progress ,
Argument * args )
1999-03-22 08:51:30 +08:00
{
1999-03-28 14:55:29 +08:00
gboolean success = TRUE ;
2006-03-28 05:09:32 +08:00
Argument * return_vals ;
2006-03-24 05:17:16 +08:00
GimpImage * image ;
2003-07-09 21:18:56 +08:00
gchar * name = NULL ;
1999-03-28 14:55:29 +08:00
2006-03-24 05:17:16 +08:00
image = gimp_image_get_by_ID ( gimp , args [ 0 ] . value . pdb_int ) ;
if ( ! GIMP_IS_IMAGE ( image ) )
1999-03-22 08:51:30 +08:00
success = FALSE ;
if ( success )
{
2006-03-24 05:17:16 +08:00
GimpVectors * vectors = gimp_image_get_active_vectors ( image ) ;
2004-03-27 00:38:44 +08:00
2003-05-16 05:15:00 +08:00
if ( vectors )
2004-03-27 00:49:18 +08:00
name = g_strdup ( gimp_object_get_name ( GIMP_OBJECT ( vectors ) ) ) ;
2003-05-16 05:15:00 +08:00
else
2004-03-27 00:49:18 +08:00
success = FALSE ;
1999-03-22 08:51:30 +08:00
}
2006-03-28 05:09:32 +08:00
return_vals = procedural_db_return_values ( proc_record , success ) ;
1999-03-28 14:55:29 +08:00
if ( success )
2006-03-28 05:09:32 +08:00
return_vals [ 1 ] . value . pdb_pointer = name ;
1999-03-22 08:51:30 +08:00
2006-03-28 05:09:32 +08:00
return return_vals ;
1999-03-22 08:51:30 +08:00
}
2003-05-16 05:15:00 +08:00
static ProcArg path_get_current_inargs [ ] =
1999-03-22 08:51:30 +08:00
{
1999-03-28 14:55:29 +08:00
{
2001-05-21 21:58:46 +08:00
GIMP_PDB_IMAGE ,
1999-03-22 08:51:30 +08:00
" image " ,
2006-03-24 05:17:16 +08:00
" The image to get the current path from "
1999-03-28 14:55:29 +08:00
}
1999-03-22 08:51:30 +08:00
} ;
2003-05-16 05:15:00 +08:00
static ProcArg path_get_current_outargs [ ] =
1999-03-22 08:51:30 +08:00
{
1999-03-28 14:55:29 +08:00
{
2003-05-16 05:15:00 +08:00
GIMP_PDB_STRING ,
2003-07-09 21:18:56 +08:00
" name " ,
2004-06-17 22:08:29 +08:00
" The name of the current path. "
1999-03-22 08:51:30 +08:00
}
} ;
2003-05-16 05:15:00 +08:00
static ProcRecord path_get_current_proc =
1999-03-22 08:51:30 +08:00
{
2005-08-03 06:52:23 +08:00
" gimp-path-get-current " ,
" gimp-path-get-current " ,
2006-03-22 20:15:06 +08:00
" This procedure is deprecated! Use 'gimp-image-get-active-vectors' instead. " ,
" This procedure is deprecated! Use 'gimp-image-get-active-vectors' instead. " ,
" " ,
" " ,
" " ,
" gimp-image-get-active-vectors " ,
2001-05-21 21:58:46 +08:00
GIMP_INTERNAL ,
2003-05-16 05:15:00 +08:00
1 ,
path_get_current_inargs ,
1 ,
path_get_current_outargs ,
{ { path_get_current_invoker } }
1999-03-22 08:51:30 +08:00
} ;
static Argument *
2006-03-28 03:32:19 +08:00
path_set_current_invoker ( ProcRecord * proc_record ,
Gimp * gimp ,
2004-08-11 02:47:21 +08:00
GimpContext * context ,
GimpProgress * progress ,
Argument * args )
1999-03-22 08:51:30 +08:00
{
1999-03-28 14:55:29 +08:00
gboolean success = TRUE ;
2006-03-24 05:17:16 +08:00
GimpImage * image ;
2003-07-09 21:18:56 +08:00
gchar * name ;
1999-03-22 08:51:30 +08:00
2006-03-24 05:17:16 +08:00
image = gimp_image_get_by_ID ( gimp , args [ 0 ] . value . pdb_int ) ;
if ( ! GIMP_IS_IMAGE ( image ) )
1999-03-22 08:51:30 +08:00
success = FALSE ;
2003-07-09 21:18:56 +08:00
name = ( gchar * ) args [ 1 ] . value . pdb_pointer ;
2003-08-19 02:09:26 +08:00
if ( name = = NULL | | ! g_utf8_validate ( name , - 1 , NULL ) )
2003-05-16 05:15:00 +08:00
success = FALSE ;
1999-03-22 08:51:30 +08:00
if ( success )
{
2006-03-24 05:17:16 +08:00
GimpVectors * vectors = gimp_image_get_vectors_by_name ( image , name ) ;
2004-03-27 00:38:44 +08:00
2003-05-16 05:15:00 +08:00
if ( vectors )
2006-03-24 05:17:16 +08:00
gimp_image_set_active_vectors ( image , vectors ) ;
1999-03-22 08:51:30 +08:00
else
2004-03-27 00:49:18 +08:00
success = FALSE ;
1999-03-22 08:51:30 +08:00
}
2006-03-28 05:09:32 +08:00
return procedural_db_return_values ( proc_record , success ) ;
1999-03-22 08:51:30 +08:00
}
2003-05-16 05:15:00 +08:00
static ProcArg path_set_current_inargs [ ] =
1999-03-22 08:51:30 +08:00
{
1999-03-28 14:55:29 +08:00
{
2001-05-21 21:58:46 +08:00
GIMP_PDB_IMAGE ,
1999-03-22 08:51:30 +08:00
" image " ,
2006-03-24 05:17:16 +08:00
" The image in which a path will become current "
2003-05-16 05:15:00 +08:00
} ,
{
GIMP_PDB_STRING ,
2003-07-09 21:18:56 +08:00
" name " ,
2004-06-17 22:08:29 +08:00
" The name of the path to make current. "
1999-03-22 08:51:30 +08:00
}
} ;
2003-05-16 05:15:00 +08:00
static ProcRecord path_set_current_proc =
1999-03-22 08:51:30 +08:00
{
2005-08-03 06:52:23 +08:00
" gimp-path-set-current " ,
" gimp-path-set-current " ,
2006-03-22 20:15:06 +08:00
" This procedure is deprecated! Use 'gimp-image-set-active-vectors' instead. " ,
" This procedure is deprecated! Use 'gimp-image-set-active-vectors' instead. " ,
" " ,
" " ,
" " ,
" gimp-image-set-active-vectors " ,
2003-05-16 05:15:00 +08:00
GIMP_INTERNAL ,
2 ,
path_set_current_inargs ,
0 ,
NULL ,
{ { path_set_current_invoker } }
} ;
static Argument *
2006-03-28 03:32:19 +08:00
path_delete_invoker ( ProcRecord * proc_record ,
Gimp * gimp ,
2004-08-11 02:47:21 +08:00
GimpContext * context ,
GimpProgress * progress ,
Argument * args )
2003-05-16 05:15:00 +08:00
{
gboolean success = TRUE ;
2006-03-24 05:17:16 +08:00
GimpImage * image ;
2003-07-09 21:18:56 +08:00
gchar * name ;
2003-05-16 05:15:00 +08:00
2006-03-24 05:17:16 +08:00
image = gimp_image_get_by_ID ( gimp , args [ 0 ] . value . pdb_int ) ;
if ( ! GIMP_IS_IMAGE ( image ) )
2003-05-16 05:15:00 +08:00
success = FALSE ;
2003-07-09 21:18:56 +08:00
name = ( gchar * ) args [ 1 ] . value . pdb_pointer ;
2003-08-19 02:09:26 +08:00
if ( name = = NULL | | ! g_utf8_validate ( name , - 1 , NULL ) )
2003-05-16 05:15:00 +08:00
success = FALSE ;
if ( success )
{
2006-03-24 05:17:16 +08:00
GimpVectors * vectors = gimp_image_get_vectors_by_name ( image , name ) ;
2004-03-27 00:38:44 +08:00
2003-05-16 05:15:00 +08:00
if ( vectors )
2006-03-24 05:17:16 +08:00
gimp_image_remove_vectors ( image , vectors ) ;
2003-05-16 05:15:00 +08:00
else
2004-03-27 00:49:18 +08:00
success = FALSE ;
2003-05-16 05:15:00 +08:00
}
2006-03-28 05:09:32 +08:00
return procedural_db_return_values ( proc_record , success ) ;
2003-05-16 05:15:00 +08:00
}
static ProcArg path_delete_inargs [ ] =
{
{
GIMP_PDB_IMAGE ,
" image " ,
2006-03-24 05:17:16 +08:00
" The image to delete the path from "
2003-05-16 05:15:00 +08:00
} ,
1999-03-28 14:55:29 +08:00
{
2001-05-21 21:58:46 +08:00
GIMP_PDB_STRING ,
2003-07-09 21:18:56 +08:00
" name " ,
2004-06-17 22:08:29 +08:00
" The name of the path to delete. "
1999-03-22 08:51:30 +08:00
}
} ;
2003-05-16 05:15:00 +08:00
static ProcRecord path_delete_proc =
1999-03-22 08:51:30 +08:00
{
2005-08-03 06:52:23 +08:00
" gimp-path-delete " ,
" gimp-path-delete " ,
2006-03-22 20:15:06 +08:00
" This procedure is deprecated! Use 'gimp-image-remove-vectors' instead. " ,
" This procedure is deprecated! Use 'gimp-image-remove-vectors' instead. " ,
" " ,
" " ,
" " ,
" gimp-image-remove-vectors " ,
2001-05-21 21:58:46 +08:00
GIMP_INTERNAL ,
2003-05-16 05:15:00 +08:00
2 ,
path_delete_inargs ,
0 ,
NULL ,
{ { path_delete_invoker } }
1999-03-22 08:51:30 +08:00
} ;
static Argument *
2006-03-28 03:32:19 +08:00
path_get_points_invoker ( ProcRecord * proc_record ,
Gimp * gimp ,
2004-08-11 02:47:21 +08:00
GimpContext * context ,
GimpProgress * progress ,
Argument * args )
1999-03-22 08:51:30 +08:00
{
1999-03-28 14:55:29 +08:00
gboolean success = TRUE ;
2006-03-28 05:09:32 +08:00
Argument * return_vals ;
2006-03-24 05:17:16 +08:00
GimpImage * image ;
2003-07-09 21:18:56 +08:00
gchar * name ;
2003-05-16 07:18:35 +08:00
gint32 path_type = 0 ;
gint32 path_closed = 0 ;
2006-03-15 23:00:01 +08:00
gint32 num_path_point_details = 0 ;
2003-05-23 03:02:38 +08:00
gdouble * points_pairs = NULL ;
1999-03-22 08:51:30 +08:00
2006-03-24 05:17:16 +08:00
image = gimp_image_get_by_ID ( gimp , args [ 0 ] . value . pdb_int ) ;
if ( ! GIMP_IS_IMAGE ( image ) )
1999-03-22 08:51:30 +08:00
success = FALSE ;
2003-07-09 21:18:56 +08:00
name = ( gchar * ) args [ 1 ] . value . pdb_pointer ;
2003-08-19 02:09:26 +08:00
if ( name = = NULL | | ! g_utf8_validate ( name , - 1 , NULL ) )
1999-04-04 15:12:22 +08:00
success = FALSE ;
1999-03-22 08:51:30 +08:00
1999-03-28 14:55:29 +08:00
if ( success )
2003-05-16 05:15:00 +08:00
{
2006-03-24 05:17:16 +08:00
GimpVectors * vectors = gimp_image_get_vectors_by_name ( image , name ) ;
2004-03-27 00:38:44 +08:00
2003-05-16 05:15:00 +08:00
if ( vectors )
2004-03-27 00:49:18 +08:00
{
GimpVectorsCompatPoint * points ;
gint num_points ;
path_type = 1 ; /* BEZIER (1.2 compat) */
points = gimp_vectors_compat_get_points ( vectors , & num_points ,
& path_closed ) ;
2006-03-15 23:00:01 +08:00
num_path_point_details = num_points * 3 ;
2004-03-27 00:49:18 +08:00
if ( points )
{
gdouble * curr_point ;
gint i ;
2006-03-15 23:00:01 +08:00
points_pairs = g_new0 ( gdouble , num_path_point_details ) ;
2004-03-27 00:49:18 +08:00
for ( i = 0 , curr_point = points_pairs ;
i < num_points ;
i + + , curr_point + = 3 )
{
curr_point [ 0 ] = points [ i ] . x ;
curr_point [ 1 ] = points [ i ] . y ;
curr_point [ 2 ] = points [ i ] . type ;
}
g_free ( points ) ;
}
else
success = FALSE ;
}
2003-05-16 05:15:00 +08:00
else
2004-03-27 00:49:18 +08:00
success = FALSE ;
2003-05-16 05:15:00 +08:00
}
1999-03-28 14:55:29 +08:00
2006-03-28 05:09:32 +08:00
return_vals = procedural_db_return_values ( proc_record , success ) ;
2003-05-16 05:15:00 +08:00
if ( success )
{
2006-03-28 05:09:32 +08:00
return_vals [ 1 ] . value . pdb_int = path_type ;
return_vals [ 2 ] . value . pdb_int = path_closed ;
return_vals [ 3 ] . value . pdb_int = num_path_point_details ;
return_vals [ 4 ] . value . pdb_pointer = points_pairs ;
2003-05-16 05:15:00 +08:00
}
2006-03-28 05:09:32 +08:00
return return_vals ;
1999-03-22 08:51:30 +08:00
}
2003-05-16 05:15:00 +08:00
static ProcArg path_get_points_inargs [ ] =
1999-03-22 08:51:30 +08:00
{
1999-03-28 14:55:29 +08:00
{
2001-05-21 21:58:46 +08:00
GIMP_PDB_IMAGE ,
1999-03-22 08:51:30 +08:00
" image " ,
2006-03-24 05:17:16 +08:00
" The image to list the paths from "
1999-03-22 08:51:30 +08:00
} ,
1999-03-28 14:55:29 +08:00
{
2001-05-21 21:58:46 +08:00
GIMP_PDB_STRING ,
2003-07-09 21:18:56 +08:00
" name " ,
2004-06-17 22:08:29 +08:00
" The name of the path whose points should be listed. "
1999-03-22 08:51:30 +08:00
}
} ;
2003-05-16 05:15:00 +08:00
static ProcArg path_get_points_outargs [ ] =
1999-03-22 08:51:30 +08:00
{
2003-05-16 05:15:00 +08:00
{
GIMP_PDB_INT32 ,
2005-08-06 02:19:09 +08:00
" path-type " ,
2003-05-16 05:15:00 +08:00
" The type of the path. Currently only one type (1 = Bezier) is supported "
} ,
{
GIMP_PDB_INT32 ,
2005-08-06 02:19:09 +08:00
" path-closed " ,
2003-05-16 05:15:00 +08:00
" Return if the path is closed. (0 = path open, 1 = path closed) "
} ,
{
GIMP_PDB_INT32 ,
2005-08-06 02:19:09 +08:00
" num-path-point-details " ,
2004-06-17 22:08:29 +08:00
" The number of points returned. Each point is made up of (x, y, pnt_type) of floats. "
2003-05-16 05:15:00 +08:00
} ,
{
GIMP_PDB_FLOATARRAY ,
2005-08-06 02:19:09 +08:00
" points-pairs " ,
2004-06-17 22:08:29 +08:00
" The points in the path represented as 3 floats. The first is the x pos, next is the y pos, last is the type of the pnt. The type field is dependant on the path type. For beziers (type 1 paths) the type can either be (1.0 = BEZIER_ANCHOR, 2.0 = BEZIER_CONTROL, 3.0 = BEZIER_MOVE). Note all points are returned in pixel resolution. "
2003-05-16 05:15:00 +08:00
}
} ;
static ProcRecord path_get_points_proc =
{
2005-08-03 06:52:23 +08:00
" gimp-path-get-points " ,
" gimp-path-get-points " ,
2003-05-16 05:15:00 +08:00
" List the points associated with the named path. " ,
" List the points associated with the named path. " ,
1999-03-22 08:51:30 +08:00
" Andy Thomas " ,
" Andy Thomas " ,
" 1999 " ,
2004-10-06 21:13:08 +08:00
NULL ,
2001-05-21 21:58:46 +08:00
GIMP_INTERNAL ,
1999-03-28 14:55:29 +08:00
2 ,
2003-05-16 05:15:00 +08:00
path_get_points_inargs ,
4 ,
path_get_points_outargs ,
{ { path_get_points_invoker } }
1999-03-22 08:51:30 +08:00
} ;
static Argument *
2006-03-28 03:32:19 +08:00
path_set_points_invoker ( ProcRecord * proc_record ,
Gimp * gimp ,
2004-08-11 02:47:21 +08:00
GimpContext * context ,
GimpProgress * progress ,
Argument * args )
1999-03-22 08:51:30 +08:00
{
1999-03-28 14:55:29 +08:00
gboolean success = TRUE ;
2006-03-24 05:17:16 +08:00
GimpImage * image ;
2006-03-15 23:32:39 +08:00
gchar * name ;
1999-03-28 14:55:29 +08:00
gint32 ptype ;
2006-03-15 23:32:39 +08:00
gint32 num_path_points ;
2003-05-16 05:15:00 +08:00
gdouble * points_pairs ;
1999-03-22 08:51:30 +08:00
2006-03-24 05:17:16 +08:00
image = gimp_image_get_by_ID ( gimp , args [ 0 ] . value . pdb_int ) ;
if ( ! GIMP_IS_IMAGE ( image ) )
1999-03-22 08:51:30 +08:00
success = FALSE ;
2003-07-09 21:18:56 +08:00
name = ( gchar * ) args [ 1 ] . value . pdb_pointer ;
2003-08-19 02:09:26 +08:00
if ( name = = NULL | | ! g_utf8_validate ( name , - 1 , NULL ) )
1999-04-04 15:12:22 +08:00
success = FALSE ;
1999-03-22 08:51:30 +08:00
1999-03-28 14:55:29 +08:00
ptype = args [ 2 ] . value . pdb_int ;
1999-03-22 08:51:30 +08:00
2003-05-16 05:15:00 +08:00
num_path_points = args [ 3 ] . value . pdb_int ;
if ( num_path_points < = 0 )
1999-04-04 15:12:22 +08:00
success = FALSE ;
1999-03-22 08:51:30 +08:00
2003-05-16 05:15:00 +08:00
points_pairs = ( gdouble * ) args [ 4 ] . value . pdb_pointer ;
1999-03-28 14:55:29 +08:00
if ( success )
1999-03-22 08:51:30 +08:00
{
2006-03-15 05:35:50 +08:00
gboolean closed = FALSE ;
2003-05-16 05:15:00 +08:00
if ( ( num_path_points / 3 ) % 3 = = 0 )
2004-03-27 00:49:18 +08:00
closed = TRUE ;
2003-05-16 05:15:00 +08:00
else if ( ( num_path_points / 3 ) % 3 ! = 2 )
2004-03-27 00:49:18 +08:00
success = FALSE ;
2004-03-27 00:38:44 +08:00
2003-05-16 05:15:00 +08:00
if ( success )
2004-03-27 00:49:18 +08:00
{
GimpVectors * vectors ;
gdouble * curr_point_pair ;
GimpVectorsCompatPoint * points ;
gint n_points ;
gint i ;
n_points = num_path_points / 3 ;
points = g_new0 ( GimpVectorsCompatPoint , n_points ) ;
for ( i = 0 , curr_point_pair = points_pairs ;
i < n_points ;
i + + , curr_point_pair + = 3 )
{
points [ i ] . x = curr_point_pair [ 0 ] ;
points [ i ] . y = curr_point_pair [ 1 ] ;
points [ i ] . type = curr_point_pair [ 2 ] ;
}
2006-03-24 05:17:16 +08:00
vectors = gimp_vectors_compat_new ( image , name , points , n_points ,
2004-03-27 00:49:18 +08:00
closed ) ;
g_free ( points ) ;
if ( vectors )
2006-03-24 05:17:16 +08:00
gimp_image_add_vectors ( image , vectors , 0 ) ;
2004-03-27 00:49:18 +08:00
else
success = FALSE ;
}
1999-03-22 08:51:30 +08:00
}
2006-03-28 05:09:32 +08:00
return procedural_db_return_values ( proc_record , success ) ;
1999-03-22 08:51:30 +08:00
}
1999-03-28 14:55:29 +08:00
static ProcArg path_set_points_inargs [ ] =
1999-03-22 08:51:30 +08:00
{
1999-03-28 14:55:29 +08:00
{
2001-05-21 21:58:46 +08:00
GIMP_PDB_IMAGE ,
1999-03-22 08:51:30 +08:00
" image " ,
2006-03-24 05:17:16 +08:00
" The image to set the paths in "
1999-03-22 08:51:30 +08:00
} ,
1999-03-28 14:55:29 +08:00
{
2001-05-21 21:58:46 +08:00
GIMP_PDB_STRING ,
2003-07-09 21:18:56 +08:00
" name " ,
2004-06-17 22:08:29 +08:00
" The name of the path to create. If it exists then a unique name will be created - query the list of paths if you want to make sure that the name of the path you create is unique. This will be set as the current path. "
1999-03-22 08:51:30 +08:00
} ,
1999-03-28 14:55:29 +08:00
{
2001-05-21 21:58:46 +08:00
GIMP_PDB_INT32 ,
1999-03-28 14:55:29 +08:00
" ptype " ,
2004-06-17 22:08:29 +08:00
" The type of the path. Currently only one type (1 = Bezier) is supported. "
1999-03-22 08:51:30 +08:00
} ,
1999-03-28 14:55:29 +08:00
{
2001-05-21 21:58:46 +08:00
GIMP_PDB_INT32 ,
2005-08-06 02:19:09 +08:00
" num-path-points " ,
2004-06-17 22:08:29 +08:00
" The number of elements in the array, i.e. the number of points in the path * 3. Each point is made up of (x, y, type) of floats. Currently only the creation of bezier curves is allowed. The type parameter must be set to (1) to indicate a BEZIER type curve. Note that for BEZIER curves, points must be given in the following order: ACCACCAC... If the path is not closed the last control point is missed off. Points consist of three control points (control/anchor/control) so for a curve that is not closed there must be at least two points passed (2 x,y pairs). If (num_path_points/3) % 3 = 0 then the path is assumed to be closed and the points are ACCACCACCACC. "
1999-03-22 08:51:30 +08:00
} ,
1999-03-28 14:55:29 +08:00
{
2001-05-21 21:58:46 +08:00
GIMP_PDB_FLOATARRAY ,
2005-08-06 02:19:09 +08:00
" points-pairs " ,
2004-06-17 22:08:29 +08:00
" The points in the path represented as 3 floats. The first is the x pos, next is the y pos, last is the type of the pnt. The type field is dependant on the path type. For beziers (type 1 paths) the type can either be (1.0 = BEZIER_ANCHOR, 2.0 = BEZIER_CONTROL, 3.0= BEZIER_MOVE). Note all points are returned in pixel resolution. "
1999-03-22 08:51:30 +08:00
}
} ;
1999-03-28 14:55:29 +08:00
static ProcRecord path_set_points_proc =
1999-03-22 08:51:30 +08:00
{
2005-08-03 06:52:23 +08:00
" gimp-path-set-points " ,
" gimp-path-set-points " ,
1999-03-28 14:55:29 +08:00
" Set the points associated with the named path. " ,
" Set the points associated with the named path. " ,
1999-03-22 08:51:30 +08:00
" Andy Thomas " ,
" Andy Thomas " ,
" 1999 " ,
2004-10-06 21:13:08 +08:00
NULL ,
2001-05-21 21:58:46 +08:00
GIMP_INTERNAL ,
1999-03-28 14:55:29 +08:00
5 ,
path_set_points_inargs ,
1999-03-22 08:51:30 +08:00
0 ,
NULL ,
1999-03-28 14:55:29 +08:00
{ { path_set_points_invoker } }
1999-03-22 08:51:30 +08:00
} ;
static Argument *
2006-03-28 03:32:19 +08:00
path_stroke_current_invoker ( ProcRecord * proc_record ,
Gimp * gimp ,
2004-08-11 02:47:21 +08:00
GimpContext * context ,
GimpProgress * progress ,
Argument * args )
1999-03-22 08:51:30 +08:00
{
1999-03-28 14:55:29 +08:00
gboolean success = TRUE ;
2006-03-24 05:17:16 +08:00
GimpImage * image ;
1999-03-22 08:51:30 +08:00
2006-03-24 05:17:16 +08:00
image = gimp_image_get_by_ID ( gimp , args [ 0 ] . value . pdb_int ) ;
if ( ! GIMP_IS_IMAGE ( image ) )
1999-03-22 08:51:30 +08:00
success = FALSE ;
if ( success )
{
2006-03-24 05:17:16 +08:00
GimpVectors * vectors = gimp_image_get_active_vectors ( image ) ;
GimpDrawable * drawable = gimp_image_active_drawable ( image ) ;
2004-03-27 00:38:44 +08:00
2003-05-16 05:15:00 +08:00
if ( vectors & & drawable )
2004-03-27 00:49:18 +08:00
{
2004-10-22 20:32:31 +08:00
GimpStrokeDesc * desc = gimp_stroke_desc_new ( gimp , context ) ;
g_object_set ( desc , " method " , GIMP_STROKE_METHOD_PAINT_CORE , NULL ) ;
success = gimp_item_stroke ( GIMP_ITEM ( vectors ) ,
drawable , context , desc , TRUE ) ;
2004-03-27 00:38:44 +08:00
2004-10-22 20:32:31 +08:00
g_object_unref ( desc ) ;
2004-03-27 00:49:18 +08:00
}
1999-03-22 08:51:30 +08:00
else
2004-03-27 00:49:18 +08:00
success = FALSE ;
1999-03-22 08:51:30 +08:00
}
2006-03-28 05:09:32 +08:00
return procedural_db_return_values ( proc_record , success ) ;
1999-03-22 08:51:30 +08:00
}
1999-03-28 14:55:29 +08:00
static ProcArg path_stroke_current_inargs [ ] =
1999-03-22 08:51:30 +08:00
{
1999-03-28 14:55:29 +08:00
{
2001-05-21 21:58:46 +08:00
GIMP_PDB_IMAGE ,
1999-03-22 08:51:30 +08:00
" image " ,
2006-03-24 05:17:16 +08:00
" The image which contains the path to stroke "
1999-03-28 14:55:29 +08:00
}
1999-03-22 08:51:30 +08:00
} ;
1999-03-28 14:55:29 +08:00
static ProcRecord path_stroke_current_proc =
1999-03-22 08:51:30 +08:00
{
2005-08-03 06:52:23 +08:00
" gimp-path-stroke-current " ,
" gimp-path-stroke-current " ,
1999-03-28 14:55:29 +08:00
" Stroke the current path in the passed image. " ,
" Stroke the current path in the passed image. " ,
1999-03-22 08:51:30 +08:00
" Andy Thomas " ,
" Andy Thomas " ,
" 1999 " ,
2004-10-06 21:13:08 +08:00
NULL ,
2001-05-21 21:58:46 +08:00
GIMP_INTERNAL ,
1999-03-28 14:55:29 +08:00
1 ,
path_stroke_current_inargs ,
1999-03-22 08:51:30 +08:00
0 ,
NULL ,
1999-03-28 14:55:29 +08:00
{ { path_stroke_current_invoker } }
1999-03-22 08:51:30 +08:00
} ;
1999-04-06 07:33:50 +08:00
static Argument *
2006-03-28 03:32:19 +08:00
path_get_point_at_dist_invoker ( ProcRecord * proc_record ,
Gimp * gimp ,
2004-08-11 02:47:21 +08:00
GimpContext * context ,
GimpProgress * progress ,
Argument * args )
1999-04-06 07:33:50 +08:00
{
gboolean success = TRUE ;
2006-03-28 05:09:32 +08:00
Argument * return_vals ;
2006-03-24 05:17:16 +08:00
GimpImage * image ;
1999-04-06 07:33:50 +08:00
gdouble distance ;
gint32 x_point = 0 ;
gint32 y_point = 0 ;
2006-03-15 23:32:39 +08:00
gdouble slope = 0.0 ;
1999-04-06 07:33:50 +08:00
2006-03-24 05:17:16 +08:00
image = gimp_image_get_by_ID ( gimp , args [ 0 ] . value . pdb_int ) ;
if ( ! GIMP_IS_IMAGE ( image ) )
1999-04-06 07:33:50 +08:00
success = FALSE ;
distance = args [ 1 ] . value . pdb_float ;
if ( success )
{
2006-03-15 05:35:50 +08:00
GimpVectors * vectors ;
GimpStroke * stroke ;
gdouble distance_along ;
gdouble stroke_length ;
gdouble stroke_distance ;
GimpCoords position ;
2006-03-24 05:17:16 +08:00
vectors = gimp_image_get_active_vectors ( image ) ;
2004-03-27 00:38:44 +08:00
2003-05-16 05:15:00 +08:00
if ( vectors )
2004-03-27 00:49:18 +08:00
{
2004-06-30 06:45:58 +08:00
distance_along = 0.0 ;
stroke = gimp_vectors_stroke_get_next ( vectors , NULL ) ;
2006-01-17 20:43:50 +08:00
while ( stroke ! = NULL )
2004-06-30 06:45:58 +08:00
{
stroke_length = gimp_stroke_get_length ( stroke , 0.5 ) ;
2006-01-17 20:43:50 +08:00
if ( distance_along + stroke_length < distance )
2004-06-30 06:45:58 +08:00
{
distance_along + = stroke_length ;
}
else
{
stroke_distance = distance - distance_along ;
stroke_distance = stroke_distance < 0 ? 0 : stroke_distance ;
if ( ! gimp_stroke_get_point_at_dist ( stroke , stroke_distance , 0.5 ,
2004-12-15 06:36:40 +08:00
& position , & slope ) )
2004-06-30 06:45:58 +08:00
{
success = FALSE ;
break ;
}
else
{
success = TRUE ;
x_point = ROUND ( position . x ) ;
y_point = ROUND ( position . y ) ;
break ;
}
}
stroke = gimp_vectors_stroke_get_next ( vectors , stroke ) ;
}
2004-03-27 00:49:18 +08:00
}
1999-04-10 12:54:34 +08:00
else
2004-06-30 06:45:58 +08:00
{
success = FALSE ;
}
1999-04-06 07:33:50 +08:00
}
2006-03-28 05:09:32 +08:00
return_vals = procedural_db_return_values ( proc_record , success ) ;
1999-04-06 07:33:50 +08:00
if ( success )
{
2006-03-28 05:09:32 +08:00
return_vals [ 1 ] . value . pdb_int = x_point ;
return_vals [ 2 ] . value . pdb_int = y_point ;
return_vals [ 3 ] . value . pdb_float = slope ;
1999-04-06 07:33:50 +08:00
}
2006-03-28 05:09:32 +08:00
return return_vals ;
1999-04-06 07:33:50 +08:00
}
static ProcArg path_get_point_at_dist_inargs [ ] =
{
{
2001-05-21 21:58:46 +08:00
GIMP_PDB_IMAGE ,
1999-04-06 07:33:50 +08:00
" image " ,
2006-03-24 05:17:16 +08:00
" The image the paths belongs to "
1999-04-06 07:33:50 +08:00
} ,
{
2001-05-21 21:58:46 +08:00
GIMP_PDB_FLOAT ,
1999-04-06 07:33:50 +08:00
" distance " ,
2004-06-17 22:08:29 +08:00
" The distance along the path. "
1999-04-06 07:33:50 +08:00
}
} ;
static ProcArg path_get_point_at_dist_outargs [ ] =
{
{
2001-05-21 21:58:46 +08:00
GIMP_PDB_INT32 ,
2005-08-06 02:19:09 +08:00
" x-point " ,
2004-06-17 22:08:29 +08:00
" The x position of the point. "
1999-04-06 07:33:50 +08:00
} ,
{
2001-05-21 21:58:46 +08:00
GIMP_PDB_INT32 ,
2005-08-06 02:19:09 +08:00
" y-point " ,
2004-06-17 22:08:29 +08:00
" The y position of the point. "
1999-04-06 07:33:50 +08:00
} ,
{
2001-05-21 21:58:46 +08:00
GIMP_PDB_FLOAT ,
2004-12-15 06:36:40 +08:00
" slope " ,
" The slope (dy / dx) at the specified point. "
1999-04-06 07:33:50 +08:00
}
} ;
static ProcRecord path_get_point_at_dist_proc =
{
2005-08-03 06:52:23 +08:00
" gimp-path-get-point-at-dist " ,
" gimp-path-get-point-at-dist " ,
2006-03-22 22:34:38 +08:00
" This procedure is deprecated! Use 'gimp-vectors-stroke-get-point-at-dist' instead. " ,
2004-06-17 22:08:29 +08:00
" This will return the x,y position of a point at a given distance along the bezier curve. The distance will be obtained by first digitizing the curve internally and then walking along the curve. For a closed curve the start of the path is the first point on the path that was created. This might not be obvious. Note the current path is used. " ,
1999-04-06 07:33:50 +08:00
" Andy Thomas " ,
" Andy Thomas " ,
" 1999 " ,
2006-03-22 22:34:38 +08:00
" gimp-vectors-stroke-get-point-at-dist " ,
2001-05-21 21:58:46 +08:00
GIMP_INTERNAL ,
1999-04-06 07:33:50 +08:00
2 ,
path_get_point_at_dist_inargs ,
3 ,
path_get_point_at_dist_outargs ,
{ { path_get_point_at_dist_invoker } }
} ;
static Argument *
2006-03-28 03:32:19 +08:00
path_get_tattoo_invoker ( ProcRecord * proc_record ,
Gimp * gimp ,
2004-08-11 02:47:21 +08:00
GimpContext * context ,
GimpProgress * progress ,
Argument * args )
1999-04-06 07:33:50 +08:00
{
gboolean success = TRUE ;
2006-03-28 05:09:32 +08:00
Argument * return_vals ;
2006-03-24 05:17:16 +08:00
GimpImage * image ;
2003-07-09 21:18:56 +08:00
gchar * name ;
1999-04-06 07:33:50 +08:00
gint32 tattoo = 0 ;
2006-03-24 05:17:16 +08:00
image = gimp_image_get_by_ID ( gimp , args [ 0 ] . value . pdb_int ) ;
if ( ! GIMP_IS_IMAGE ( image ) )
1999-04-06 07:33:50 +08:00
success = FALSE ;
2003-07-09 21:18:56 +08:00
name = ( gchar * ) args [ 1 ] . value . pdb_pointer ;
2003-08-19 02:09:26 +08:00
if ( name = = NULL | | ! g_utf8_validate ( name , - 1 , NULL ) )
1999-04-06 07:33:50 +08:00
success = FALSE ;
if ( success )
{
2006-03-24 05:17:16 +08:00
GimpVectors * vectors = gimp_image_get_vectors_by_name ( image , name ) ;
2004-03-27 00:38:44 +08:00
2003-05-16 05:15:00 +08:00
if ( vectors )
2004-03-27 00:49:18 +08:00
tattoo = gimp_item_get_tattoo ( GIMP_ITEM ( vectors ) ) ;
1999-04-10 12:54:34 +08:00
else
2004-03-27 00:49:18 +08:00
success = FALSE ;
1999-04-06 07:33:50 +08:00
}
2006-03-28 05:09:32 +08:00
return_vals = procedural_db_return_values ( proc_record , success ) ;
1999-04-06 07:33:50 +08:00
if ( success )
2006-03-28 05:09:32 +08:00
return_vals [ 1 ] . value . pdb_int = tattoo ;
1999-04-06 07:33:50 +08:00
2006-03-28 05:09:32 +08:00
return return_vals ;
1999-04-06 07:33:50 +08:00
}
static ProcArg path_get_tattoo_inargs [ ] =
{
{
2001-05-21 21:58:46 +08:00
GIMP_PDB_IMAGE ,
1999-04-06 07:33:50 +08:00
" image " ,
1999-04-10 12:54:34 +08:00
" The image "
1999-04-06 07:33:50 +08:00
} ,
{
2001-05-21 21:58:46 +08:00
GIMP_PDB_STRING ,
2003-07-09 21:18:56 +08:00
" name " ,
2004-06-17 22:08:29 +08:00
" The name of the path whose tattoo should be obtained. "
1999-04-06 07:33:50 +08:00
}
} ;
static ProcArg path_get_tattoo_outargs [ ] =
{
{
2001-05-21 21:58:46 +08:00
GIMP_PDB_INT32 ,
1999-04-06 07:33:50 +08:00
" tattoo " ,
2004-06-17 22:08:29 +08:00
" The tattoo associated with the named path. "
1999-04-06 07:33:50 +08:00
}
} ;
static ProcRecord path_get_tattoo_proc =
{
2005-08-03 06:52:23 +08:00
" gimp-path-get-tattoo " ,
" gimp-path-get-tattoo " ,
2006-03-22 20:15:06 +08:00
" This procedure is deprecated! Use 'gimp-vectors-get-tattoo' instead. " ,
" This procedure is deprecated! Use 'gimp-vectors-get-tattoo' instead. " ,
" " ,
" " ,
" " ,
" gimp-vectors-get-tattoo " ,
2001-05-21 21:58:46 +08:00
GIMP_INTERNAL ,
1999-04-06 07:33:50 +08:00
2 ,
path_get_tattoo_inargs ,
1 ,
path_get_tattoo_outargs ,
{ { path_get_tattoo_invoker } }
} ;
static Argument *
2006-03-28 03:32:19 +08:00
path_set_tattoo_invoker ( ProcRecord * proc_record ,
Gimp * gimp ,
2004-08-11 02:47:21 +08:00
GimpContext * context ,
GimpProgress * progress ,
Argument * args )
1999-04-06 07:33:50 +08:00
{
gboolean success = TRUE ;
2006-03-24 05:17:16 +08:00
GimpImage * image ;
2003-07-09 21:18:56 +08:00
gchar * name ;
2006-03-15 23:32:39 +08:00
gint32 tattovalue ;
1999-04-06 07:33:50 +08:00
2006-03-24 05:17:16 +08:00
image = gimp_image_get_by_ID ( gimp , args [ 0 ] . value . pdb_int ) ;
if ( ! GIMP_IS_IMAGE ( image ) )
1999-04-06 07:33:50 +08:00
success = FALSE ;
2003-07-09 21:18:56 +08:00
name = ( gchar * ) args [ 1 ] . value . pdb_pointer ;
2003-08-19 02:09:26 +08:00
if ( name = = NULL | | ! g_utf8_validate ( name , - 1 , NULL ) )
2003-05-16 05:15:00 +08:00
success = FALSE ;
tattovalue = args [ 2 ] . value . pdb_int ;
1999-04-06 07:33:50 +08:00
if ( success )
{
2006-03-24 05:17:16 +08:00
GimpVectors * vectors = gimp_image_get_vectors_by_name ( image , name ) ;
2004-03-27 00:38:44 +08:00
2003-05-16 05:15:00 +08:00
if ( vectors )
2004-03-27 00:49:18 +08:00
gimp_item_set_tattoo ( GIMP_ITEM ( vectors ) , tattovalue ) ;
1999-04-06 07:33:50 +08:00
else
2004-03-27 00:49:18 +08:00
success = FALSE ;
1999-04-06 07:33:50 +08:00
}
2006-03-28 05:09:32 +08:00
return procedural_db_return_values ( proc_record , success ) ;
1999-04-06 07:33:50 +08:00
}
2003-05-16 05:15:00 +08:00
static ProcArg path_set_tattoo_inargs [ ] =
1999-04-06 07:33:50 +08:00
{
{
2001-05-21 21:58:46 +08:00
GIMP_PDB_IMAGE ,
1999-04-06 07:33:50 +08:00
" image " ,
1999-04-10 12:54:34 +08:00
" The image "
1999-04-06 07:33:50 +08:00
} ,
{
2001-05-21 21:58:46 +08:00
GIMP_PDB_STRING ,
2003-07-09 21:18:56 +08:00
" name " ,
2003-05-16 05:15:00 +08:00
" the name of the path whose tattoo should be set "
} ,
{
GIMP_PDB_INT32 ,
" tattovalue " ,
" The tattoo associated with the name path. Only values returned from 'path_get_tattoo' should be used here "
1999-04-06 07:33:50 +08:00
}
} ;
2003-05-16 05:15:00 +08:00
static ProcRecord path_set_tattoo_proc =
1999-04-06 07:33:50 +08:00
{
2005-08-03 06:52:23 +08:00
" gimp-path-set-tattoo " ,
" gimp-path-set-tattoo " ,
2006-03-22 20:15:06 +08:00
" This procedure is deprecated! Use 'gimp-vectors-set-tattoo' instead. " ,
" This procedure is deprecated! Use 'gimp-vectors-set-tattoo' instead. " ,
" " ,
" " ,
" " ,
" gimp-vectors-set-tattoo " ,
2001-05-21 21:58:46 +08:00
GIMP_INTERNAL ,
2003-05-16 05:15:00 +08:00
3 ,
path_set_tattoo_inargs ,
0 ,
NULL ,
{ { path_set_tattoo_invoker } }
1999-04-06 07:33:50 +08:00
} ;
1999-07-07 05:19:34 +08:00
static Argument *
2006-03-28 03:32:19 +08:00
get_path_by_tattoo_invoker ( ProcRecord * proc_record ,
Gimp * gimp ,
2004-08-11 02:47:21 +08:00
GimpContext * context ,
GimpProgress * progress ,
Argument * args )
1999-07-07 05:19:34 +08:00
{
gboolean success = TRUE ;
2006-03-28 05:09:32 +08:00
Argument * return_vals ;
2006-03-24 05:17:16 +08:00
GimpImage * image ;
2003-05-16 05:15:00 +08:00
gint32 tattoo ;
2003-07-09 21:18:56 +08:00
gchar * name = NULL ;
1999-07-07 05:19:34 +08:00
2006-03-24 05:17:16 +08:00
image = gimp_image_get_by_ID ( gimp , args [ 0 ] . value . pdb_int ) ;
if ( ! GIMP_IS_IMAGE ( image ) )
1999-07-07 05:19:34 +08:00
success = FALSE ;
2003-05-16 05:15:00 +08:00
tattoo = args [ 1 ] . value . pdb_int ;
if ( success )
{
2006-03-24 05:17:16 +08:00
GimpVectors * vectors = gimp_image_get_vectors_by_tattoo ( image , tattoo ) ;
2004-03-27 00:38:44 +08:00
2003-05-16 05:15:00 +08:00
if ( vectors )
2004-03-27 00:49:18 +08:00
name = g_strdup ( gimp_object_get_name ( GIMP_OBJECT ( vectors ) ) ) ;
2003-05-16 05:15:00 +08:00
else
2004-03-27 00:49:18 +08:00
success = FALSE ;
2003-05-16 05:15:00 +08:00
}
2006-03-28 05:09:32 +08:00
return_vals = procedural_db_return_values ( proc_record , success ) ;
1999-07-07 05:19:34 +08:00
if ( success )
2006-03-28 05:09:32 +08:00
return_vals [ 1 ] . value . pdb_pointer = name ;
1999-07-07 05:19:34 +08:00
2006-03-28 05:09:32 +08:00
return return_vals ;
1999-07-07 05:19:34 +08:00
}
2003-05-16 05:15:00 +08:00
static ProcArg get_path_by_tattoo_inargs [ ] =
1999-07-07 05:19:34 +08:00
{
{
2001-05-21 21:58:46 +08:00
GIMP_PDB_IMAGE ,
1999-07-07 05:19:34 +08:00
" image " ,
2003-05-16 05:15:00 +08:00
" The image "
1999-07-07 05:19:34 +08:00
} ,
2003-05-16 05:15:00 +08:00
{
GIMP_PDB_INT32 ,
" tattoo " ,
2004-06-17 22:08:29 +08:00
" The tattoo of the required path. "
2003-05-16 05:15:00 +08:00
}
} ;
static ProcArg get_path_by_tattoo_outargs [ ] =
{
1999-07-07 05:19:34 +08:00
{
2001-05-21 21:58:46 +08:00
GIMP_PDB_STRING ,
2003-07-09 21:18:56 +08:00
" name " ,
2004-06-17 22:08:29 +08:00
" The name of the path with the specified tattoo. "
1999-07-07 05:19:34 +08:00
}
} ;
2003-05-16 05:15:00 +08:00
static ProcRecord get_path_by_tattoo_proc =
1999-07-07 05:19:34 +08:00
{
2005-08-03 06:52:23 +08:00
" gimp-get-path-by-tattoo " ,
" gimp-get-path-by-tattoo " ,
2006-03-22 20:15:06 +08:00
" This procedure is deprecated! Use 'gimp-image-get-vectors-by-tattoo' instead. " ,
" This procedure is deprecated! Use 'gimp-image-get-vectors-by-tattoo' instead. " ,
" " ,
" " ,
" " ,
" gimp-image-get-vectors-by-tattoo " ,
2001-05-21 21:58:46 +08:00
GIMP_INTERNAL ,
1999-07-07 05:19:34 +08:00
2 ,
2003-05-16 05:15:00 +08:00
get_path_by_tattoo_inargs ,
1 ,
get_path_by_tattoo_outargs ,
{ { get_path_by_tattoo_invoker } }
1999-07-07 05:19:34 +08:00
} ;
2000-02-02 12:14:23 +08:00
static Argument *
2006-03-28 03:32:19 +08:00
path_get_locked_invoker ( ProcRecord * proc_record ,
Gimp * gimp ,
2004-08-11 02:47:21 +08:00
GimpContext * context ,
GimpProgress * progress ,
Argument * args )
2000-02-02 12:14:23 +08:00
{
gboolean success = TRUE ;
2006-03-28 05:09:32 +08:00
Argument * return_vals ;
2006-03-24 05:17:16 +08:00
GimpImage * image ;
2003-07-09 21:18:56 +08:00
gchar * name ;
2005-03-03 19:10:37 +08:00
gboolean locked = FALSE ;
2000-02-02 12:14:23 +08:00
2006-03-24 05:17:16 +08:00
image = gimp_image_get_by_ID ( gimp , args [ 0 ] . value . pdb_int ) ;
if ( ! GIMP_IS_IMAGE ( image ) )
2000-02-02 12:14:23 +08:00
success = FALSE ;
2003-07-09 21:18:56 +08:00
name = ( gchar * ) args [ 1 ] . value . pdb_pointer ;
2003-08-19 02:09:26 +08:00
if ( name = = NULL | | ! g_utf8_validate ( name , - 1 , NULL ) )
2000-02-02 12:14:23 +08:00
success = FALSE ;
if ( success )
{
2006-03-24 05:17:16 +08:00
GimpVectors * vectors = gimp_image_get_vectors_by_name ( image , name ) ;
2004-03-27 00:38:44 +08:00
2003-05-16 05:15:00 +08:00
if ( vectors )
2005-03-03 19:10:37 +08:00
locked = gimp_item_get_linked ( GIMP_ITEM ( vectors ) ) ;
2000-02-02 12:14:23 +08:00
else
2004-03-27 00:49:18 +08:00
success = FALSE ;
2000-02-02 12:14:23 +08:00
}
2006-03-28 05:09:32 +08:00
return_vals = procedural_db_return_values ( proc_record , success ) ;
2000-02-02 12:14:23 +08:00
if ( success )
2006-03-28 05:09:32 +08:00
return_vals [ 1 ] . value . pdb_int = locked ;
2000-02-02 12:14:23 +08:00
2006-03-28 05:09:32 +08:00
return return_vals ;
2000-02-02 12:14:23 +08:00
}
static ProcArg path_get_locked_inargs [ ] =
{
{
2001-05-21 21:58:46 +08:00
GIMP_PDB_IMAGE ,
2000-02-02 12:14:23 +08:00
" image " ,
" The image "
} ,
{
2001-05-21 21:58:46 +08:00
GIMP_PDB_STRING ,
2003-07-09 21:18:56 +08:00
" name " ,
2004-06-17 22:08:29 +08:00
" The name of the path whose locked status should be obtained. "
2000-02-02 12:14:23 +08:00
}
} ;
static ProcArg path_get_locked_outargs [ ] =
{
{
2001-05-21 21:58:46 +08:00
GIMP_PDB_INT32 ,
2005-03-03 19:10:37 +08:00
" locked " ,
" TRUE if the path is locked, FALSE otherwise "
2000-02-02 12:14:23 +08:00
}
} ;
static ProcRecord path_get_locked_proc =
{
2005-08-03 06:52:23 +08:00
" gimp-path-get-locked " ,
" gimp-path-get-locked " ,
2006-03-22 20:15:06 +08:00
" This procedure is deprecated! Use 'gimp-vectors-get-linked' instead. " ,
" This procedure is deprecated! Use 'gimp-vectors-get-linked' instead. " ,
" " ,
" " ,
" " ,
" gimp-vectors-get-linked " ,
2001-05-21 21:58:46 +08:00
GIMP_INTERNAL ,
2000-02-02 12:14:23 +08:00
2 ,
path_get_locked_inargs ,
1 ,
path_get_locked_outargs ,
{ { path_get_locked_invoker } }
} ;
static Argument *
2006-03-28 03:32:19 +08:00
path_set_locked_invoker ( ProcRecord * proc_record ,
Gimp * gimp ,
2004-08-11 02:47:21 +08:00
GimpContext * context ,
GimpProgress * progress ,
Argument * args )
2000-02-02 12:14:23 +08:00
{
gboolean success = TRUE ;
2006-03-24 05:17:16 +08:00
GimpImage * image ;
2003-07-09 21:18:56 +08:00
gchar * name ;
2006-03-15 23:32:39 +08:00
gboolean locked ;
2000-02-02 12:14:23 +08:00
2006-03-24 05:17:16 +08:00
image = gimp_image_get_by_ID ( gimp , args [ 0 ] . value . pdb_int ) ;
if ( ! GIMP_IS_IMAGE ( image ) )
2000-02-02 12:14:23 +08:00
success = FALSE ;
2003-07-09 21:18:56 +08:00
name = ( gchar * ) args [ 1 ] . value . pdb_pointer ;
2003-08-19 02:09:26 +08:00
if ( name = = NULL | | ! g_utf8_validate ( name , - 1 , NULL ) )
2000-02-02 12:14:23 +08:00
success = FALSE ;
2005-03-03 19:10:37 +08:00
locked = args [ 2 ] . value . pdb_int ? TRUE : FALSE ;
2000-02-02 12:14:23 +08:00
if ( success )
{
2006-03-24 05:17:16 +08:00
GimpVectors * vectors = gimp_image_get_vectors_by_name ( image , name ) ;
2004-03-27 00:38:44 +08:00
2003-05-16 05:15:00 +08:00
if ( vectors )
2005-03-03 19:10:37 +08:00
gimp_item_set_linked ( GIMP_ITEM ( vectors ) , locked , TRUE ) ;
2000-02-02 12:14:23 +08:00
else
2004-03-27 00:49:18 +08:00
success = FALSE ;
2000-02-02 12:14:23 +08:00
}
2006-03-28 05:09:32 +08:00
return procedural_db_return_values ( proc_record , success ) ;
2000-02-02 12:14:23 +08:00
}
static ProcArg path_set_locked_inargs [ ] =
{
{
2001-05-21 21:58:46 +08:00
GIMP_PDB_IMAGE ,
2000-02-02 12:14:23 +08:00
" image " ,
" The image "
} ,
{
2001-05-21 21:58:46 +08:00
GIMP_PDB_STRING ,
2003-07-09 21:18:56 +08:00
" name " ,
2000-02-02 12:14:23 +08:00
" the name of the path whose locked status should be set "
} ,
{
2001-05-21 21:58:46 +08:00
GIMP_PDB_INT32 ,
2005-03-03 19:10:37 +08:00
" locked " ,
" Whether the path is locked "
2000-02-02 12:14:23 +08:00
}
} ;
static ProcRecord path_set_locked_proc =
{
2005-08-03 06:52:23 +08:00
" gimp-path-set-locked " ,
" gimp-path-set-locked " ,
2006-03-22 20:15:06 +08:00
" This procedure is deprecated! Use 'gimp-vectors-set-linked' instead. " ,
" This procedure is deprecated! Use 'gimp-vectors-set-linked' instead. " ,
" " ,
" " ,
" " ,
" gimp-vectors-set-linked " ,
2001-05-21 21:58:46 +08:00
GIMP_INTERNAL ,
2000-02-02 12:14:23 +08:00
3 ,
path_set_locked_inargs ,
0 ,
NULL ,
{ { path_set_locked_invoker } }
} ;
2003-07-09 21:18:56 +08:00
static Argument *
2006-03-28 03:32:19 +08:00
path_to_selection_invoker ( ProcRecord * proc_record ,
Gimp * gimp ,
2004-08-11 02:47:21 +08:00
GimpContext * context ,
GimpProgress * progress ,
Argument * args )
2003-07-09 21:18:56 +08:00
{
gboolean success = TRUE ;
2006-03-24 05:17:16 +08:00
GimpImage * image ;
2003-07-09 21:18:56 +08:00
gchar * name ;
gint32 op ;
gboolean antialias ;
gboolean feather ;
gdouble feather_radius_x ;
gdouble feather_radius_y ;
2006-03-24 05:17:16 +08:00
image = gimp_image_get_by_ID ( gimp , args [ 0 ] . value . pdb_int ) ;
if ( ! GIMP_IS_IMAGE ( image ) )
2003-07-09 21:18:56 +08:00
success = FALSE ;
name = ( gchar * ) args [ 1 ] . value . pdb_pointer ;
2003-08-19 02:09:26 +08:00
if ( name = = NULL | | ! g_utf8_validate ( name , - 1 , NULL ) )
2003-07-09 21:18:56 +08:00
success = FALSE ;
op = args [ 2 ] . value . pdb_int ;
if ( op < GIMP_CHANNEL_OP_ADD | | op > GIMP_CHANNEL_OP_INTERSECT )
success = FALSE ;
antialias = args [ 3 ] . value . pdb_int ? TRUE : FALSE ;
feather = args [ 4 ] . value . pdb_int ? TRUE : FALSE ;
feather_radius_x = args [ 5 ] . value . pdb_float ;
feather_radius_y = args [ 6 ] . value . pdb_float ;
if ( success )
{
2006-03-24 05:17:16 +08:00
GimpVectors * vectors = gimp_image_get_vectors_by_name ( image , name ) ;
2004-03-27 00:38:44 +08:00
2003-07-09 21:18:56 +08:00
if ( vectors )
2006-03-24 05:17:16 +08:00
gimp_channel_select_vectors ( gimp_image_get_mask ( image ) ,
2004-03-27 00:49:18 +08:00
_ ( " Path to Selection " ) ,
vectors ,
op ,
antialias ,
feather ,
feather_radius_x ,
feather_radius_y ) ;
2003-07-09 21:18:56 +08:00
else
2004-03-27 00:49:18 +08:00
success = FALSE ;
2003-07-09 21:18:56 +08:00
}
2006-03-28 05:09:32 +08:00
return procedural_db_return_values ( proc_record , success ) ;
2003-07-09 21:18:56 +08:00
}
static ProcArg path_to_selection_inargs [ ] =
{
{
GIMP_PDB_IMAGE ,
" image " ,
" The image "
} ,
{
GIMP_PDB_STRING ,
" name " ,
2004-06-17 22:08:29 +08:00
" The name of the path which should be made into selection. "
2003-07-09 21:18:56 +08:00
} ,
{
GIMP_PDB_INT32 ,
" op " ,
2006-03-25 05:57:47 +08:00
" The desired operation with current selection: { GIMP_CHANNEL_OP_ADD (0), GIMP_CHANNEL_OP_SUBTRACT (1), GIMP_CHANNEL_OP_REPLACE (2), GIMP_CHANNEL_OP_INTERSECT (3) } "
2003-07-09 21:18:56 +08:00
} ,
{
GIMP_PDB_INT32 ,
" antialias " ,
2004-06-17 22:08:29 +08:00
" Antialias selection. "
2003-07-09 21:18:56 +08:00
} ,
{
GIMP_PDB_INT32 ,
" feather " ,
2004-06-17 22:08:29 +08:00
" Feather selection. "
2003-07-09 21:18:56 +08:00
} ,
{
GIMP_PDB_FLOAT ,
2005-08-06 02:19:09 +08:00
" feather-radius-x " ,
2004-06-17 22:08:29 +08:00
" Feather radius x. "
2003-07-09 21:18:56 +08:00
} ,
{
GIMP_PDB_FLOAT ,
2005-08-06 02:19:09 +08:00
" feather-radius-y " ,
2004-06-17 22:08:29 +08:00
" Feather radius y. "
2003-07-09 21:18:56 +08:00
}
} ;
static ProcRecord path_to_selection_proc =
{
2005-08-03 06:52:23 +08:00
" gimp-path-to-selection " ,
" gimp-path-to-selection " ,
2003-07-09 21:18:56 +08:00
" Transforms the active path into a selection " ,
" This procedure renders the desired path into the current selection. " ,
2006-03-15 05:35:50 +08:00
" Jo \xc3 \xa3 o S. O. Bueno Calligaris " ,
" Jo \xc3 \xa3 o S. O. Bueno Calligaris " ,
2003-07-09 21:18:56 +08:00
" 2003 " ,
2004-10-06 21:13:08 +08:00
NULL ,
2003-07-09 21:18:56 +08:00
GIMP_INTERNAL ,
7 ,
path_to_selection_inargs ,
0 ,
NULL ,
{ { path_to_selection_invoker } }
} ;
2003-09-22 01:29:12 +08:00
static Argument *
2006-03-28 03:32:19 +08:00
path_import_invoker ( ProcRecord * proc_record ,
Gimp * gimp ,
2004-08-11 02:47:21 +08:00
GimpContext * context ,
GimpProgress * progress ,
Argument * args )
2003-09-22 01:29:12 +08:00
{
gboolean success = TRUE ;
2006-03-24 05:17:16 +08:00
GimpImage * image ;
2003-09-22 01:29:12 +08:00
gchar * filename ;
gboolean merge ;
2003-09-25 08:39:46 +08:00
gboolean scale ;
2003-09-22 01:29:12 +08:00
2006-03-24 05:17:16 +08:00
image = gimp_image_get_by_ID ( gimp , args [ 0 ] . value . pdb_int ) ;
if ( ! GIMP_IS_IMAGE ( image ) )
2003-09-22 01:29:12 +08:00
success = FALSE ;
filename = ( gchar * ) args [ 1 ] . value . pdb_pointer ;
if ( filename = = NULL )
success = FALSE ;
merge = args [ 2 ] . value . pdb_int ? TRUE : FALSE ;
2003-09-25 08:39:46 +08:00
scale = args [ 3 ] . value . pdb_int ? TRUE : FALSE ;
2003-09-22 01:29:12 +08:00
if ( success )
2006-03-22 17:58:08 +08:00
{
2006-03-24 05:17:16 +08:00
success = gimp_vectors_import_file ( image , filename , merge , scale , - 1 , NULL ) ;
2006-03-22 17:58:08 +08:00
}
2003-09-22 01:29:12 +08:00
2006-03-28 05:09:32 +08:00
return procedural_db_return_values ( proc_record , success ) ;
2003-09-22 01:29:12 +08:00
}
static ProcArg path_import_inargs [ ] =
{
{
GIMP_PDB_IMAGE ,
" image " ,
" The image "
} ,
{
GIMP_PDB_STRING ,
" filename " ,
" The name of the SVG file to import. "
} ,
{
GIMP_PDB_INT32 ,
" merge " ,
2004-06-17 22:08:29 +08:00
" Merge paths into a single vectors object. "
2003-09-25 08:39:46 +08:00
} ,
{
GIMP_PDB_INT32 ,
" scale " ,
2004-06-17 22:08:29 +08:00
" Scale the SVG to image dimensions. "
2003-09-22 01:29:12 +08:00
}
} ;
static ProcRecord path_import_proc =
{
2005-08-03 06:52:23 +08:00
" gimp-path-import " ,
" gimp-path-import " ,
2003-09-22 01:29:12 +08:00
" Import paths from an SVG file. " ,
2005-03-03 19:02:12 +08:00
" This procedure imports paths from an SVG file. SVG elements other than paths and basic shapes are ignored. " ,
2006-03-15 05:35:50 +08:00
" Sven Neumann <sven@gimp.org> " ,
2003-09-22 01:29:12 +08:00
" Sven Neumann " ,
" 2003 " ,
2004-10-06 21:13:08 +08:00
NULL ,
2003-09-22 01:29:12 +08:00
GIMP_INTERNAL ,
2003-09-25 08:39:46 +08:00
4 ,
2003-09-22 01:29:12 +08:00
path_import_inargs ,
0 ,
NULL ,
{ { path_import_invoker } }
} ;
2005-03-03 19:02:12 +08:00
static Argument *
2006-03-28 03:32:19 +08:00
path_import_string_invoker ( ProcRecord * proc_record ,
Gimp * gimp ,
2005-03-03 19:02:12 +08:00
GimpContext * context ,
GimpProgress * progress ,
Argument * args )
{
gboolean success = TRUE ;
2006-03-24 05:17:16 +08:00
GimpImage * image ;
2005-03-03 19:02:12 +08:00
gchar * string ;
gint32 length ;
gboolean merge ;
gboolean scale ;
2006-03-24 05:17:16 +08:00
image = gimp_image_get_by_ID ( gimp , args [ 0 ] . value . pdb_int ) ;
if ( ! GIMP_IS_IMAGE ( image ) )
2005-03-03 19:02:12 +08:00
success = FALSE ;
string = ( gchar * ) args [ 1 ] . value . pdb_pointer ;
if ( string = = NULL )
success = FALSE ;
length = args [ 2 ] . value . pdb_int ;
merge = args [ 3 ] . value . pdb_int ? TRUE : FALSE ;
scale = args [ 4 ] . value . pdb_int ? TRUE : FALSE ;
if ( success )
2006-03-22 17:58:08 +08:00
{
2006-03-24 05:17:16 +08:00
success = gimp_vectors_import_buffer ( image , string , length ,
2006-03-22 17:58:08 +08:00
merge , scale , - 1 , NULL ) ;
}
2005-03-03 19:02:12 +08:00
2006-03-28 05:09:32 +08:00
return procedural_db_return_values ( proc_record , success ) ;
2005-03-03 19:02:12 +08:00
}
static ProcArg path_import_string_inargs [ ] =
{
{
GIMP_PDB_IMAGE ,
" image " ,
" The image "
} ,
{
GIMP_PDB_STRING ,
" string " ,
" A string that must be a complete and valid SVG document. "
} ,
{
GIMP_PDB_INT32 ,
" length " ,
" Number of bytes in string or -1 if the string is NULL terminated. "
} ,
{
GIMP_PDB_INT32 ,
" merge " ,
" Merge paths into a single vectors object. "
} ,
{
GIMP_PDB_INT32 ,
" scale " ,
" Scale the SVG to image dimensions. "
}
} ;
static ProcRecord path_import_string_proc =
{
2005-08-03 06:52:23 +08:00
" gimp-path-import-string " ,
" gimp-path-import-string " ,
2005-03-03 19:02:12 +08:00
" Import paths from an SVG string. " ,
2005-03-03 19:10:37 +08:00
" This procedure works like gimp_path_import() but takes a string rather than reading the SVG from a file. This allows you to write scripts that generate SVG and feed it to GIMP. " ,
2006-03-15 05:35:50 +08:00
" Sven Neumann <sven@gimp.org> " ,
2005-03-03 19:02:12 +08:00
" Sven Neumann " ,
" 2005 " ,
NULL ,
GIMP_INTERNAL ,
5 ,
path_import_string_inargs ,
0 ,
NULL ,
{ { path_import_string_invoker } }
} ;