Fix #10460
This commit is contained in:
parent
59e1f6dc4c
commit
1ccceccb01
4 changed files with 28 additions and 19 deletions
|
|
@ -2464,7 +2464,7 @@ register_vectors_procs (GimpPDB *pdb)
|
|||
gimp_param_spec_vectors ("vectors",
|
||||
"vectors",
|
||||
"The vectors object to export, or %NULL for all in the image",
|
||||
FALSE,
|
||||
TRUE,
|
||||
GIMP_PARAM_READWRITE | GIMP_PARAM_NO_VALIDATE));
|
||||
gimp_pdb_register_procedure (pdb, procedure);
|
||||
g_object_unref (procedure);
|
||||
|
|
@ -2493,7 +2493,7 @@ register_vectors_procs (GimpPDB *pdb)
|
|||
gimp_param_spec_vectors ("vectors",
|
||||
"vectors",
|
||||
"The vectors object to export, or %NULL for all in the image",
|
||||
FALSE,
|
||||
TRUE,
|
||||
GIMP_PARAM_READWRITE | GIMP_PARAM_NO_VALIDATE));
|
||||
gimp_procedure_add_return_value (procedure,
|
||||
gimp_param_spec_string ("string",
|
||||
|
|
|
|||
|
|
@ -1191,7 +1191,7 @@ gimp_vectors_import_from_string (GimpImage *image,
|
|||
* gimp_vectors_export_to_file:
|
||||
* @image: The image.
|
||||
* @file: The SVG file to create.
|
||||
* @vectors: The vectors object to export, or %NULL for all in the image.
|
||||
* @vectors: (nullable): The vectors object to export, or %NULL for all in the image.
|
||||
*
|
||||
* save a path as an SVG file.
|
||||
*
|
||||
|
|
@ -1234,7 +1234,7 @@ gimp_vectors_export_to_file (GimpImage *image,
|
|||
/**
|
||||
* gimp_vectors_export_to_string:
|
||||
* @image: The image.
|
||||
* @vectors: The vectors object to export, or %NULL for all in the image.
|
||||
* @vectors: (nullable): The vectors object to export, or %NULL for all in the image.
|
||||
*
|
||||
* Save a path as an SVG string.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1266,7 +1266,8 @@ HELP
|
|||
desc => 'The image' },
|
||||
{ name => 'file', type => 'file',
|
||||
desc => 'The SVG file to create.' },
|
||||
{ name => 'vectors', type => 'vectors', no_validate => 1,
|
||||
{ name => 'vectors', type => 'vectors',
|
||||
no_validate => 1, none_ok => 1,
|
||||
desc => 'The vectors object to export, or %NULL for all in the image' }
|
||||
);
|
||||
|
||||
|
|
@ -1302,7 +1303,8 @@ HELP
|
|||
@inargs = (
|
||||
{ name => 'image', type => 'image',
|
||||
desc => 'The image' },
|
||||
{ name => 'vectors', type => 'vectors', no_validate => 1,
|
||||
{ name => 'vectors', type => 'vectors',
|
||||
no_validate => 1, none_ok => 1,
|
||||
desc => 'The vectors object to export, or %NULL for all in the image' }
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -70,17 +70,24 @@
|
|||
(assert `(= (car (gimp-image-get-vectors ,testImage))
|
||||
1))
|
||||
|
||||
; FIXME: crashes in gimpvectors-export.c line 234
|
||||
; possibly because path has no strokes?
|
||||
; export to string succeeds
|
||||
;(assert `(gimp-vectors-export-to-string
|
||||
; ,testImage
|
||||
; ,testPath))
|
||||
|
||||
; export-to-string all
|
||||
; FAIL: crashes
|
||||
; PDB doc says 0 should work, and ScriptFu is marshalling to a null GimpVectors*
|
||||
; so the PDB function in C is at fault?
|
||||
;(assert `(gimp-vectors-export-to-string
|
||||
; ,testImage
|
||||
; 0))
|
||||
; export methods
|
||||
|
||||
; export string succeeds
|
||||
(assert `(gimp-vectors-export-to-string
|
||||
,testImage
|
||||
,testPath))
|
||||
|
||||
; export string all succeeds
|
||||
; passing 0 for path means "all"
|
||||
(assert `(gimp-vectors-export-to-string
|
||||
,testImage
|
||||
0))
|
||||
|
||||
; export file all succeeds
|
||||
(assert `(gimp-vectors-export-to-file
|
||||
,testImage
|
||||
"tmp.svg"
|
||||
0))
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue