~ubuntu-branches/ubuntu/jaunty/gimp/jaunty-security

« back to all changes in this revision

Viewing changes to libgimp/gimppaths_pdb.c

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Holbach
  • Date: 2007-05-02 16:33:03 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20070502163303-bvzhjzbpw8qglc4y
Tags: 2.3.16-1ubuntu1
* Resynchronized with Debian, remaining Ubuntu changes:
  - debian/rules: i18n magic.
* debian/control.in:
  - Maintainer: Ubuntu Core Developers <ubuntu-devel@lists.ubuntu.com>
* debian/patches/02_help-message.patch,
  debian/patches/03_gimp.desktop.in.in.patch,
  debian/patches/10_dont_show_wizard.patch: updated.
* debian/patches/04_composite-signedness.patch,
  debian/patches/05_add-letter-spacing.patch: dropped, used upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 * Boston, MA 02111-1307, USA.
20
20
 */
21
21
 
22
 
/* NOTE: This file is autogenerated by pdbgen.pl */
 
22
/* NOTE: This file is auto-generated by pdbgen.pl */
23
23
 
24
24
#include "config.h"
25
25
 
26
26
#include <string.h>
27
27
 
28
28
#include "gimp.h"
 
29
#undef GIMP_DISABLE_DEPRECATED
 
30
#undef __GIMP_PATHS_PDB_H__
 
31
#include "gimppaths_pdb.h"
29
32
 
30
33
/**
31
34
 * gimp_path_list:
32
 
 * @image_ID: The ID of the image to list the paths from.
 
35
 * @image_ID: The image to list the paths from.
33
36
 * @num_paths: The number of paths returned.
34
37
 *
35
 
 * List the paths associated with the passed image.
36
 
 *
37
 
 * List the paths associated with the passed image.
 
38
 * This procedure is deprecated! Use gimp_image_get_vectors() instead.
38
39
 *
39
40
 * Returns: List of the paths belonging to this image.
40
41
 */
41
42
gchar **
42
43
gimp_path_list (gint32  image_ID,
43
 
                gint   *num_paths)
 
44
                gint   *num_paths)
44
45
{
45
46
  GimpParam *return_vals;
46
47
  gint nreturn_vals;
47
48
  gchar **path_list = NULL;
48
49
  gint i;
49
50
 
50
 
  return_vals = gimp_run_procedure ("gimp_path_list",
51
 
                                    &nreturn_vals,
52
 
                                    GIMP_PDB_IMAGE, image_ID,
53
 
                                    GIMP_PDB_END);
 
51
  return_vals = gimp_run_procedure ("gimp-path-list",
 
52
                                    &nreturn_vals,
 
53
                                    GIMP_PDB_IMAGE, image_ID,
 
54
                                    GIMP_PDB_END);
54
55
 
55
56
  *num_paths = 0;
56
57
 
59
60
      *num_paths = return_vals[1].data.d_int32;
60
61
      path_list = g_new (gchar *, *num_paths);
61
62
      for (i = 0; i < *num_paths; i++)
62
 
        path_list[i] = g_strdup (return_vals[2].data.d_stringarray[i]);
 
63
        path_list[i] = g_strdup (return_vals[2].data.d_stringarray[i]);
63
64
    }
64
65
 
65
66
  gimp_destroy_params (return_vals, nreturn_vals);
69
70
 
70
71
/**
71
72
 * gimp_path_get_current:
72
 
 * @image_ID: The ID of the image to get the current path from.
73
 
 *
74
 
 * The name of the current path. Error if no paths.
75
 
 *
76
 
 * The name of the current path. Error if no paths.
 
73
 * @image_ID: The image to get the current path from.
 
74
 *
 
75
 * This procedure is deprecated! Use gimp_image_get_active_vectors()
 
76
 * instead.
77
77
 *
78
78
 * Returns: The name of the current path.
79
79
 */
84
84
  gint nreturn_vals;
85
85
  gchar *name = NULL;
86
86
 
87
 
  return_vals = gimp_run_procedure ("gimp_path_get_current",
88
 
                                    &nreturn_vals,
89
 
                                    GIMP_PDB_IMAGE, image_ID,
90
 
                                    GIMP_PDB_END);
 
87
  return_vals = gimp_run_procedure ("gimp-path-get-current",
 
88
                                    &nreturn_vals,
 
89
                                    GIMP_PDB_IMAGE, image_ID,
 
90
                                    GIMP_PDB_END);
91
91
 
92
92
  if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
93
93
    name = g_strdup (return_vals[1].data.d_string);
99
99
 
100
100
/**
101
101
 * gimp_path_set_current:
102
 
 * @image_ID: The ID of the image in which a path will become current.
 
102
 * @image_ID: The image in which a path will become current.
103
103
 * @name: The name of the path to make current.
104
104
 *
105
 
 * Sets the current path associated with the passed image.
106
 
 *
107
 
 * Sets a named path as the current path.
 
105
 * This procedure is deprecated! Use gimp_image_set_active_vectors()
 
106
 * instead.
108
107
 *
109
108
 * Returns: TRUE on success.
110
109
 */
111
110
gboolean
112
111
gimp_path_set_current (gint32       image_ID,
113
 
                       const gchar *name)
 
112
                       const gchar *name)
114
113
{
115
114
  GimpParam *return_vals;
116
115
  gint nreturn_vals;
117
116
  gboolean success = TRUE;
118
117
 
119
 
  return_vals = gimp_run_procedure ("gimp_path_set_current",
120
 
                                    &nreturn_vals,
121
 
                                    GIMP_PDB_IMAGE, image_ID,
122
 
                                    GIMP_PDB_STRING, name,
123
 
                                    GIMP_PDB_END);
 
118
  return_vals = gimp_run_procedure ("gimp-path-set-current",
 
119
                                    &nreturn_vals,
 
120
                                    GIMP_PDB_IMAGE, image_ID,
 
121
                                    GIMP_PDB_STRING, name,
 
122
                                    GIMP_PDB_END);
124
123
 
125
124
  success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
126
125
 
131
130
 
132
131
/**
133
132
 * gimp_path_delete:
134
 
 * @image_ID: The ID of the image to delete the path from.
 
133
 * @image_ID: The image to delete the path from.
135
134
 * @name: The name of the path to delete.
136
135
 *
137
 
 * Delete the named path associated with the passed image.
138
 
 *
139
 
 * Delete the named path.
 
136
 * This procedure is deprecated! Use gimp_image_remove_vectors()
 
137
 * instead.
140
138
 *
141
139
 * Returns: TRUE on success.
142
140
 */
143
141
gboolean
144
142
gimp_path_delete (gint32       image_ID,
145
 
                  const gchar *name)
 
143
                  const gchar *name)
146
144
{
147
145
  GimpParam *return_vals;
148
146
  gint nreturn_vals;
149
147
  gboolean success = TRUE;
150
148
 
151
 
  return_vals = gimp_run_procedure ("gimp_path_delete",
152
 
                                    &nreturn_vals,
153
 
                                    GIMP_PDB_IMAGE, image_ID,
154
 
                                    GIMP_PDB_STRING, name,
155
 
                                    GIMP_PDB_END);
 
149
  return_vals = gimp_run_procedure ("gimp-path-delete",
 
150
                                    &nreturn_vals,
 
151
                                    GIMP_PDB_IMAGE, image_ID,
 
152
                                    GIMP_PDB_STRING, name,
 
153
                                    GIMP_PDB_END);
156
154
 
157
155
  success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
158
156
 
163
161
 
164
162
/**
165
163
 * gimp_path_get_points:
166
 
 * @image_ID: The ID of the image to list the paths from.
 
164
 * @image_ID: The image to list the paths from.
167
165
 * @name: The name of the path whose points should be listed.
168
166
 * @path_closed: Return if the path is closed. (0 = path open, 1 = path closed).
169
167
 * @num_path_point_details: The number of points returned. Each point is made up of (x, y, pnt_type) of floats.
170
168
 * @points_pairs: 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.
171
169
 *
172
 
 * List the points associated with the named path.
173
 
 *
174
 
 * List the points associated with the named path.
 
170
 * This procedure is deprecated! Use gimp_vectors_stroke_get_points()
 
171
 * instead.
175
172
 *
176
173
 * Returns: The type of the path. Currently only one type (1 = Bezier) is supported.
177
174
 */
178
175
gint
179
176
gimp_path_get_points (gint32        image_ID,
180
 
                      const gchar  *name,
181
 
                      gint         *path_closed,
182
 
                      gint         *num_path_point_details,
183
 
                      gdouble     **points_pairs)
 
177
                      const gchar  *name,
 
178
                      gint         *path_closed,
 
179
                      gint         *num_path_point_details,
 
180
                      gdouble     **points_pairs)
184
181
{
185
182
  GimpParam *return_vals;
186
183
  gint nreturn_vals;
187
184
  gint path_type = 0;
188
185
 
189
 
  return_vals = gimp_run_procedure ("gimp_path_get_points",
190
 
                                    &nreturn_vals,
191
 
                                    GIMP_PDB_IMAGE, image_ID,
192
 
                                    GIMP_PDB_STRING, name,
193
 
                                    GIMP_PDB_END);
 
186
  return_vals = gimp_run_procedure ("gimp-path-get-points",
 
187
                                    &nreturn_vals,
 
188
                                    GIMP_PDB_IMAGE, image_ID,
 
189
                                    GIMP_PDB_STRING, name,
 
190
                                    GIMP_PDB_END);
194
191
 
195
192
  *num_path_point_details = 0;
196
193
 
200
197
      *path_closed = return_vals[2].data.d_int32;
201
198
      *num_path_point_details = return_vals[3].data.d_int32;
202
199
      *points_pairs = g_new (gdouble, *num_path_point_details);
203
 
      memcpy (*points_pairs, return_vals[4].data.d_floatarray,
204
 
              *num_path_point_details * sizeof (gdouble));
 
200
      memcpy (*points_pairs,
 
201
              return_vals[4].data.d_floatarray,
 
202
              *num_path_point_details * sizeof (gdouble));
205
203
    }
206
204
 
207
205
  gimp_destroy_params (return_vals, nreturn_vals);
211
209
 
212
210
/**
213
211
 * gimp_path_set_points:
214
 
 * @image_ID: The ID of the image to set the paths in.
 
212
 * @image_ID: The image to set the paths in.
215
213
 * @name: 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.
216
214
 * @ptype: The type of the path. Currently only one type (1 = Bezier) is supported.
217
215
 * @num_path_points: 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.
218
216
 * @points_pairs: 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.
219
217
 *
220
 
 * Set the points associated with the named path.
221
 
 *
222
 
 * Set the points associated with the named path.
 
218
 * This procedure is deprecated! Use vectors_stroke_new_from_points()
 
219
 * instead.
223
220
 *
224
221
 * Returns: TRUE on success.
225
222
 */
226
223
gboolean
227
224
gimp_path_set_points (gint32         image_ID,
228
 
                      const gchar   *name,
229
 
                      gint           ptype,
230
 
                      gint           num_path_points,
231
 
                      const gdouble *points_pairs)
 
225
                      const gchar   *name,
 
226
                      gint           ptype,
 
227
                      gint           num_path_points,
 
228
                      const gdouble *points_pairs)
232
229
{
233
230
  GimpParam *return_vals;
234
231
  gint nreturn_vals;
235
232
  gboolean success = TRUE;
236
233
 
237
 
  return_vals = gimp_run_procedure ("gimp_path_set_points",
238
 
                                    &nreturn_vals,
239
 
                                    GIMP_PDB_IMAGE, image_ID,
240
 
                                    GIMP_PDB_STRING, name,
241
 
                                    GIMP_PDB_INT32, ptype,
242
 
                                    GIMP_PDB_INT32, num_path_points,
243
 
                                    GIMP_PDB_FLOATARRAY, points_pairs,
244
 
                                    GIMP_PDB_END);
 
234
  return_vals = gimp_run_procedure ("gimp-path-set-points",
 
235
                                    &nreturn_vals,
 
236
                                    GIMP_PDB_IMAGE, image_ID,
 
237
                                    GIMP_PDB_STRING, name,
 
238
                                    GIMP_PDB_INT32, ptype,
 
239
                                    GIMP_PDB_INT32, num_path_points,
 
240
                                    GIMP_PDB_FLOATARRAY, points_pairs,
 
241
                                    GIMP_PDB_END);
245
242
 
246
243
  success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
247
244
 
252
249
 
253
250
/**
254
251
 * gimp_path_stroke_current:
255
 
 * @image_ID: The ID of the image which contains the path to stroke.
256
 
 *
257
 
 * Stroke the current path in the passed image.
258
 
 *
259
 
 * Stroke the current path in the passed image.
 
252
 * @image_ID: The image which contains the path to stroke.
 
253
 *
 
254
 * This procedure is deprecated! Use gimp_edit_stroke_vectors()
 
255
 * instead.
260
256
 *
261
257
 * Returns: TRUE on success.
262
258
 */
267
263
  gint nreturn_vals;
268
264
  gboolean success = TRUE;
269
265
 
270
 
  return_vals = gimp_run_procedure ("gimp_path_stroke_current",
271
 
                                    &nreturn_vals,
272
 
                                    GIMP_PDB_IMAGE, image_ID,
273
 
                                    GIMP_PDB_END);
 
266
  return_vals = gimp_run_procedure ("gimp-path-stroke-current",
 
267
                                    &nreturn_vals,
 
268
                                    GIMP_PDB_IMAGE, image_ID,
 
269
                                    GIMP_PDB_END);
274
270
 
275
271
  success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
276
272
 
281
277
 
282
278
/**
283
279
 * gimp_path_get_point_at_dist:
284
 
 * @image_ID: The ID of the image the paths belongs to.
 
280
 * @image_ID: The image the paths belongs to.
285
281
 * @distance: The distance along the path.
286
282
 * @y_point: The y position of the point.
287
283
 * @slope: The slope (dy / dx) at the specified point.
288
284
 *
289
 
 * Get point on a path at a specified distance along the path.
290
 
 *
291
 
 * This will return the x,y position of a point at a given distance
292
 
 * along the bezier curve. The distance will be obtained by first
293
 
 * digitizing the curve internally and then walking along the curve.
294
 
 * For a closed curve the start of the path is the first point on the
295
 
 * path that was created. This might not be obvious. Note the current
296
 
 * path is used.
 
285
 * This procedure is deprecated! Use
 
286
 * gimp_vectors_stroke_get_point_at_dist() instead.
297
287
 *
298
288
 * Returns: The x position of the point.
299
289
 */
300
290
gint
301
291
gimp_path_get_point_at_dist (gint32   image_ID,
302
 
                             gdouble  distance,
303
 
                             gint    *y_point,
304
 
                             gdouble *slope)
 
292
                             gdouble  distance,
 
293
                             gint    *y_point,
 
294
                             gdouble *slope)
305
295
{
306
296
  GimpParam *return_vals;
307
297
  gint nreturn_vals;
308
298
  gint x_point = 0;
309
299
 
310
 
  return_vals = gimp_run_procedure ("gimp_path_get_point_at_dist",
311
 
                                    &nreturn_vals,
312
 
                                    GIMP_PDB_IMAGE, image_ID,
313
 
                                    GIMP_PDB_FLOAT, distance,
314
 
                                    GIMP_PDB_END);
 
300
  return_vals = gimp_run_procedure ("gimp-path-get-point-at-dist",
 
301
                                    &nreturn_vals,
 
302
                                    GIMP_PDB_IMAGE, image_ID,
 
303
                                    GIMP_PDB_FLOAT, distance,
 
304
                                    GIMP_PDB_END);
315
305
 
316
306
  if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
317
307
    {
330
320
 * @image_ID: The image.
331
321
 * @name: The name of the path whose tattoo should be obtained.
332
322
 *
333
 
 * Returns the tattoo associated with the name path.
334
 
 *
335
 
 * This procedure returns the tattoo associated with the specified
336
 
 * path. A tattoo is a unique and permanent identifier attached to a
337
 
 * path that can be used to uniquely identify a path within an image
338
 
 * even between sessions.
 
323
 * This procedure is deprecated! Use gimp_vectors_get_tattoo() instead.
339
324
 *
340
325
 * Returns: The tattoo associated with the named path.
341
326
 */
342
327
gint
343
328
gimp_path_get_tattoo (gint32       image_ID,
344
 
                      const gchar *name)
 
329
                      const gchar *name)
345
330
{
346
331
  GimpParam *return_vals;
347
332
  gint nreturn_vals;
348
333
  gint tattoo = 0;
349
334
 
350
 
  return_vals = gimp_run_procedure ("gimp_path_get_tattoo",
351
 
                                    &nreturn_vals,
352
 
                                    GIMP_PDB_IMAGE, image_ID,
353
 
                                    GIMP_PDB_STRING, name,
354
 
                                    GIMP_PDB_END);
 
335
  return_vals = gimp_run_procedure ("gimp-path-get-tattoo",
 
336
                                    &nreturn_vals,
 
337
                                    GIMP_PDB_IMAGE, image_ID,
 
338
                                    GIMP_PDB_STRING, name,
 
339
                                    GIMP_PDB_END);
355
340
 
356
341
  if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
357
342
    tattoo = return_vals[1].data.d_int32;
367
352
 * @name: the name of the path whose tattoo should be set.
368
353
 * @tattovalue: The tattoo associated with the name path. Only values returned from 'path_get_tattoo' should be used here.
369
354
 *
370
 
 * Sets the tattoo associated with the named path.
371
 
 *
372
 
 * This procedure sets the tattoo associated with the specified path. A
373
 
 * tattoo is a unique and permenant identifier attached to a path that
374
 
 * can be used to uniquely identify a path within an image even between
375
 
 * sessions. Note that the value passed to this function must have been
376
 
 * obtained from a previous call to path_get_tattoo.
 
355
 * This procedure is deprecated! Use gimp_vectors_set_tattoo() instead.
377
356
 *
378
357
 * Returns: TRUE on success.
379
358
 */
380
359
gboolean
381
360
gimp_path_set_tattoo (gint32       image_ID,
382
 
                      const gchar *name,
383
 
                      gint         tattovalue)
 
361
                      const gchar *name,
 
362
                      gint         tattovalue)
384
363
{
385
364
  GimpParam *return_vals;
386
365
  gint nreturn_vals;
387
366
  gboolean success = TRUE;
388
367
 
389
 
  return_vals = gimp_run_procedure ("gimp_path_set_tattoo",
390
 
                                    &nreturn_vals,
391
 
                                    GIMP_PDB_IMAGE, image_ID,
392
 
                                    GIMP_PDB_STRING, name,
393
 
                                    GIMP_PDB_INT32, tattovalue,
394
 
                                    GIMP_PDB_END);
 
368
  return_vals = gimp_run_procedure ("gimp-path-set-tattoo",
 
369
                                    &nreturn_vals,
 
370
                                    GIMP_PDB_IMAGE, image_ID,
 
371
                                    GIMP_PDB_STRING, name,
 
372
                                    GIMP_PDB_INT32, tattovalue,
 
373
                                    GIMP_PDB_END);
395
374
 
396
375
  success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
397
376
 
405
384
 * @image_ID: The image.
406
385
 * @tattoo: The tattoo of the required path.
407
386
 *
408
 
 * Return the name of the path with the given tattoo.
409
 
 *
410
 
 * The procedure returns the name of the path in the specified image
411
 
 * which has the passed tattoo. The tattoos are unique within the image
412
 
 * and will be preserved across sessions and through renaming of the
413
 
 * path. An error is returned if no path with the specified tattoo can
414
 
 * be found.
 
387
 * This procedure is deprecated! Use gimp_image_get_vectors_by_tattoo()
 
388
 * instead.
415
389
 *
416
390
 * Returns: The name of the path with the specified tattoo.
417
391
 */
418
392
gchar *
419
393
gimp_get_path_by_tattoo (gint32 image_ID,
420
 
                         gint   tattoo)
 
394
                         gint   tattoo)
421
395
{
422
396
  GimpParam *return_vals;
423
397
  gint nreturn_vals;
424
398
  gchar *name = NULL;
425
399
 
426
 
  return_vals = gimp_run_procedure ("gimp_get_path_by_tattoo",
427
 
                                    &nreturn_vals,
428
 
                                    GIMP_PDB_IMAGE, image_ID,
429
 
                                    GIMP_PDB_INT32, tattoo,
430
 
                                    GIMP_PDB_END);
 
400
  return_vals = gimp_run_procedure ("gimp-get-path-by-tattoo",
 
401
                                    &nreturn_vals,
 
402
                                    GIMP_PDB_IMAGE, image_ID,
 
403
                                    GIMP_PDB_INT32, tattoo,
 
404
                                    GIMP_PDB_END);
431
405
 
432
406
  if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
433
407
    name = g_strdup (return_vals[1].data.d_string);
442
416
 * @image_ID: The image.
443
417
 * @name: The name of the path whose locked status should be obtained.
444
418
 *
445
 
 * Returns the locked status associated with the named path.
446
 
 *
447
 
 * This procedure returns the lock status associated with the specified
448
 
 * path. A path can be \"locked\" which means that the transformation
449
 
 * tool operations will also apply to the path.
450
 
 *
451
 
 * Returns: The lock status associated with the name path. 0 is returned if the path is not locked. 1 is returned if the path is locked.
 
419
 * This procedure is deprecated! Use gimp_vectors_get_linked() instead.
 
420
 *
 
421
 * Returns: TRUE if the path is locked, FALSE otherwise.
452
422
 */
453
 
gint
 
423
gboolean
454
424
gimp_path_get_locked (gint32       image_ID,
455
 
                      const gchar *name)
 
425
                      const gchar *name)
456
426
{
457
427
  GimpParam *return_vals;
458
428
  gint nreturn_vals;
459
 
  gint lockstatus = 0;
 
429
  gboolean locked = FALSE;
460
430
 
461
 
  return_vals = gimp_run_procedure ("gimp_path_get_locked",
462
 
                                    &nreturn_vals,
463
 
                                    GIMP_PDB_IMAGE, image_ID,
464
 
                                    GIMP_PDB_STRING, name,
465
 
                                    GIMP_PDB_END);
 
431
  return_vals = gimp_run_procedure ("gimp-path-get-locked",
 
432
                                    &nreturn_vals,
 
433
                                    GIMP_PDB_IMAGE, image_ID,
 
434
                                    GIMP_PDB_STRING, name,
 
435
                                    GIMP_PDB_END);
466
436
 
467
437
  if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
468
 
    lockstatus = return_vals[1].data.d_int32;
 
438
    locked = return_vals[1].data.d_int32;
469
439
 
470
440
  gimp_destroy_params (return_vals, nreturn_vals);
471
441
 
472
 
  return lockstatus;
 
442
  return locked;
473
443
}
474
444
 
475
445
/**
476
446
 * gimp_path_set_locked:
477
447
 * @image_ID: The image.
478
448
 * @name: the name of the path whose locked status should be set.
479
 
 * @lockstatus: The lock status associated with the name path. 0 if the path is not locked. 1 if the path is to be locked.
480
 
 *
481
 
 * Set the locked status associated with the named path.
482
 
 *
483
 
 * This procedure sets the lock status associated with the specified
484
 
 * path. A path can be \"locked\" which means that the transformation
485
 
 * tool operations will also apply to the path.
 
449
 * @locked: Whether the path is locked.
 
450
 *
 
451
 * This procedure is deprecated! Use gimp_vectors_set_linked() instead.
486
452
 *
487
453
 * Returns: TRUE on success.
488
454
 */
489
455
gboolean
490
456
gimp_path_set_locked (gint32       image_ID,
491
 
                      const gchar *name,
492
 
                      gint         lockstatus)
 
457
                      const gchar *name,
 
458
                      gboolean     locked)
493
459
{
494
460
  GimpParam *return_vals;
495
461
  gint nreturn_vals;
496
462
  gboolean success = TRUE;
497
463
 
498
 
  return_vals = gimp_run_procedure ("gimp_path_set_locked",
499
 
                                    &nreturn_vals,
500
 
                                    GIMP_PDB_IMAGE, image_ID,
501
 
                                    GIMP_PDB_STRING, name,
502
 
                                    GIMP_PDB_INT32, lockstatus,
503
 
                                    GIMP_PDB_END);
 
464
  return_vals = gimp_run_procedure ("gimp-path-set-locked",
 
465
                                    &nreturn_vals,
 
466
                                    GIMP_PDB_IMAGE, image_ID,
 
467
                                    GIMP_PDB_STRING, name,
 
468
                                    GIMP_PDB_INT32, locked,
 
469
                                    GIMP_PDB_END);
504
470
 
505
471
  success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
506
472
 
519
485
 * @feather_radius_x: Feather radius x.
520
486
 * @feather_radius_y: Feather radius y.
521
487
 *
522
 
 * Transforms the active path into a selection
523
 
 *
524
 
 * This procedure renders the desired path into the current selection.
 
488
 * This procedure is deprecated! Use gimp_vectors_to_selection()
 
489
 * instead.
525
490
 *
526
491
 * Returns: TRUE on success.
527
492
 */
528
493
gboolean
529
494
gimp_path_to_selection (gint32          image_ID,
530
 
                        const gchar    *name,
531
 
                        GimpChannelOps  op,
532
 
                        gboolean        antialias,
533
 
                        gboolean        feather,
534
 
                        gdouble         feather_radius_x,
535
 
                        gdouble         feather_radius_y)
 
495
                        const gchar    *name,
 
496
                        GimpChannelOps  op,
 
497
                        gboolean        antialias,
 
498
                        gboolean        feather,
 
499
                        gdouble         feather_radius_x,
 
500
                        gdouble         feather_radius_y)
536
501
{
537
502
  GimpParam *return_vals;
538
503
  gint nreturn_vals;
539
504
  gboolean success = TRUE;
540
505
 
541
 
  return_vals = gimp_run_procedure ("gimp_path_to_selection",
542
 
                                    &nreturn_vals,
543
 
                                    GIMP_PDB_IMAGE, image_ID,
544
 
                                    GIMP_PDB_STRING, name,
545
 
                                    GIMP_PDB_INT32, op,
546
 
                                    GIMP_PDB_INT32, antialias,
547
 
                                    GIMP_PDB_INT32, feather,
548
 
                                    GIMP_PDB_FLOAT, feather_radius_x,
549
 
                                    GIMP_PDB_FLOAT, feather_radius_y,
550
 
                                    GIMP_PDB_END);
 
506
  return_vals = gimp_run_procedure ("gimp-path-to-selection",
 
507
                                    &nreturn_vals,
 
508
                                    GIMP_PDB_IMAGE, image_ID,
 
509
                                    GIMP_PDB_STRING, name,
 
510
                                    GIMP_PDB_INT32, op,
 
511
                                    GIMP_PDB_INT32, antialias,
 
512
                                    GIMP_PDB_INT32, feather,
 
513
                                    GIMP_PDB_FLOAT, feather_radius_x,
 
514
                                    GIMP_PDB_FLOAT, feather_radius_y,
 
515
                                    GIMP_PDB_END);
551
516
 
552
517
  success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
553
518
 
563
528
 * @merge: Merge paths into a single vectors object.
564
529
 * @scale: Scale the SVG to image dimensions.
565
530
 *
566
 
 * Import paths from an SVG file.
567
 
 *
568
 
 * This procedure imports paths from an SVG file. This is a temporary
569
 
 * solution until the new vectors PDB API is in place. Don't rely on
570
 
 * this function being available in future GIMP releases.
 
531
 * This procedure is deprecated! Use vectors_import_from_file()
 
532
 * instead.
571
533
 *
572
534
 * Returns: TRUE on success.
573
535
 */
574
536
gboolean
575
537
gimp_path_import (gint32       image_ID,
576
 
                  const gchar *filename,
577
 
                  gboolean     merge,
578
 
                  gboolean     scale)
 
538
                  const gchar *filename,
 
539
                  gboolean     merge,
 
540
                  gboolean     scale)
579
541
{
580
542
  GimpParam *return_vals;
581
543
  gint nreturn_vals;
582
544
  gboolean success = TRUE;
583
545
 
584
 
  return_vals = gimp_run_procedure ("gimp_path_import",
585
 
                                    &nreturn_vals,
586
 
                                    GIMP_PDB_IMAGE, image_ID,
587
 
                                    GIMP_PDB_STRING, filename,
588
 
                                    GIMP_PDB_INT32, merge,
589
 
                                    GIMP_PDB_INT32, scale,
590
 
                                    GIMP_PDB_END);
 
546
  return_vals = gimp_run_procedure ("gimp-path-import",
 
547
                                    &nreturn_vals,
 
548
                                    GIMP_PDB_IMAGE, image_ID,
 
549
                                    GIMP_PDB_STRING, filename,
 
550
                                    GIMP_PDB_INT32, merge,
 
551
                                    GIMP_PDB_INT32, scale,
 
552
                                    GIMP_PDB_END);
591
553
 
592
554
  success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
593
555