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

« back to all changes in this revision

Viewing changes to libgimp/gimppainttools_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
 
44
44
 */
45
45
gboolean
46
46
gimp_airbrush (gint32         drawable_ID,
47
 
               gdouble        pressure,
48
 
               gint           num_strokes,
49
 
               const gdouble *strokes)
 
47
               gdouble        pressure,
 
48
               gint           num_strokes,
 
49
               const gdouble *strokes)
50
50
{
51
51
  GimpParam *return_vals;
52
52
  gint nreturn_vals;
53
53
  gboolean success = TRUE;
54
54
 
55
 
  return_vals = gimp_run_procedure ("gimp_airbrush",
56
 
                                    &nreturn_vals,
57
 
                                    GIMP_PDB_DRAWABLE, drawable_ID,
58
 
                                    GIMP_PDB_FLOAT, pressure,
59
 
                                    GIMP_PDB_INT32, num_strokes,
60
 
                                    GIMP_PDB_FLOATARRAY, strokes,
61
 
                                    GIMP_PDB_END);
 
55
  return_vals = gimp_run_procedure ("gimp-airbrush",
 
56
                                    &nreturn_vals,
 
57
                                    GIMP_PDB_DRAWABLE, drawable_ID,
 
58
                                    GIMP_PDB_FLOAT, pressure,
 
59
                                    GIMP_PDB_INT32, num_strokes,
 
60
                                    GIMP_PDB_FLOATARRAY, strokes,
 
61
                                    GIMP_PDB_END);
62
62
 
63
63
  success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
64
64
 
77
77
 * is time-dependent.
78
78
 *
79
79
 * This tool simulates the use of an airbrush. It is similar to
80
 
 * gimp_airbrush except that the pressure is derived from the airbrush
81
 
 * tools options box. It the option has not been set the default for
82
 
 * the option will be used.
 
80
 * gimp_airbrush() except that the pressure is derived from the
 
81
 * airbrush tools options box. It the option has not been set the
 
82
 * default for the option will be used.
83
83
 *
84
84
 * Returns: TRUE on success.
85
85
 */
86
86
gboolean
87
87
gimp_airbrush_default (gint32         drawable_ID,
88
 
                       gint           num_strokes,
89
 
                       const gdouble *strokes)
 
88
                       gint           num_strokes,
 
89
                       const gdouble *strokes)
90
90
{
91
91
  GimpParam *return_vals;
92
92
  gint nreturn_vals;
93
93
  gboolean success = TRUE;
94
94
 
95
 
  return_vals = gimp_run_procedure ("gimp_airbrush_default",
96
 
                                    &nreturn_vals,
97
 
                                    GIMP_PDB_DRAWABLE, drawable_ID,
98
 
                                    GIMP_PDB_INT32, num_strokes,
99
 
                                    GIMP_PDB_FLOATARRAY, strokes,
100
 
                                    GIMP_PDB_END);
 
95
  return_vals = gimp_run_procedure ("gimp-airbrush-default",
 
96
                                    &nreturn_vals,
 
97
                                    GIMP_PDB_DRAWABLE, drawable_ID,
 
98
                                    GIMP_PDB_INT32, num_strokes,
 
99
                                    GIMP_PDB_FLOATARRAY, strokes,
 
100
                                    GIMP_PDB_END);
101
101
 
102
102
  success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
103
103
 
135
135
 */
136
136
gboolean
137
137
gimp_clone (gint32         drawable_ID,
138
 
            gint32         src_drawable_ID,
139
 
            GimpCloneType  clone_type,
140
 
            gdouble        src_x,
141
 
            gdouble        src_y,
142
 
            gint           num_strokes,
143
 
            const gdouble *strokes)
 
138
            gint32         src_drawable_ID,
 
139
            GimpCloneType  clone_type,
 
140
            gdouble        src_x,
 
141
            gdouble        src_y,
 
142
            gint           num_strokes,
 
143
            const gdouble *strokes)
144
144
{
145
145
  GimpParam *return_vals;
146
146
  gint nreturn_vals;
147
147
  gboolean success = TRUE;
148
148
 
149
 
  return_vals = gimp_run_procedure ("gimp_clone",
150
 
                                    &nreturn_vals,
151
 
                                    GIMP_PDB_DRAWABLE, drawable_ID,
152
 
                                    GIMP_PDB_DRAWABLE, src_drawable_ID,
153
 
                                    GIMP_PDB_INT32, clone_type,
154
 
                                    GIMP_PDB_FLOAT, src_x,
155
 
                                    GIMP_PDB_FLOAT, src_y,
156
 
                                    GIMP_PDB_INT32, num_strokes,
157
 
                                    GIMP_PDB_FLOATARRAY, strokes,
158
 
                                    GIMP_PDB_END);
 
149
  return_vals = gimp_run_procedure ("gimp-clone",
 
150
                                    &nreturn_vals,
 
151
                                    GIMP_PDB_DRAWABLE, drawable_ID,
 
152
                                    GIMP_PDB_DRAWABLE, src_drawable_ID,
 
153
                                    GIMP_PDB_INT32, clone_type,
 
154
                                    GIMP_PDB_FLOAT, src_x,
 
155
                                    GIMP_PDB_FLOAT, src_y,
 
156
                                    GIMP_PDB_INT32, num_strokes,
 
157
                                    GIMP_PDB_FLOATARRAY, strokes,
 
158
                                    GIMP_PDB_END);
159
159
 
160
160
  success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
161
161
 
174
174
 *
175
175
 * This tool clones (copies) from the source drawable starting at the
176
176
 * specified source coordinates to the dest drawable. This function
177
 
 * performs exactly the same as the gimp_clone function except that the
178
 
 * tools arguments are obtained from the clones option dialog. It this
179
 
 * dialog has not been activated then the dialogs default values will
180
 
 * be used.
 
177
 * performs exactly the same as the gimp_clone() function except that
 
178
 * the tools arguments are obtained from the clones option dialog. It
 
179
 * this dialog has not been activated then the dialogs default values
 
180
 * will be used.
181
181
 *
182
182
 * Returns: TRUE on success.
183
183
 */
184
184
gboolean
185
185
gimp_clone_default (gint32         drawable_ID,
186
 
                    gint           num_strokes,
187
 
                    const gdouble *strokes)
 
186
                    gint           num_strokes,
 
187
                    const gdouble *strokes)
188
188
{
189
189
  GimpParam *return_vals;
190
190
  gint nreturn_vals;
191
191
  gboolean success = TRUE;
192
192
 
193
 
  return_vals = gimp_run_procedure ("gimp_clone_default",
194
 
                                    &nreturn_vals,
195
 
                                    GIMP_PDB_DRAWABLE, drawable_ID,
196
 
                                    GIMP_PDB_INT32, num_strokes,
197
 
                                    GIMP_PDB_FLOATARRAY, strokes,
198
 
                                    GIMP_PDB_END);
 
193
  return_vals = gimp_run_procedure ("gimp-clone-default",
 
194
                                    &nreturn_vals,
 
195
                                    GIMP_PDB_DRAWABLE, drawable_ID,
 
196
                                    GIMP_PDB_INT32, num_strokes,
 
197
                                    GIMP_PDB_FLOATARRAY, strokes,
 
198
                                    GIMP_PDB_END);
199
199
 
200
200
  success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
201
201
 
223
223
 */
224
224
gboolean
225
225
gimp_convolve (gint32            drawable_ID,
226
 
               gdouble           pressure,
227
 
               GimpConvolveType  convolve_type,
228
 
               gint              num_strokes,
229
 
               const gdouble    *strokes)
 
226
               gdouble           pressure,
 
227
               GimpConvolveType  convolve_type,
 
228
               gint              num_strokes,
 
229
               const gdouble    *strokes)
230
230
{
231
231
  GimpParam *return_vals;
232
232
  gint nreturn_vals;
233
233
  gboolean success = TRUE;
234
234
 
235
 
  return_vals = gimp_run_procedure ("gimp_convolve",
236
 
                                    &nreturn_vals,
237
 
                                    GIMP_PDB_DRAWABLE, drawable_ID,
238
 
                                    GIMP_PDB_FLOAT, pressure,
239
 
                                    GIMP_PDB_INT32, convolve_type,
240
 
                                    GIMP_PDB_INT32, num_strokes,
241
 
                                    GIMP_PDB_FLOATARRAY, strokes,
242
 
                                    GIMP_PDB_END);
 
235
  return_vals = gimp_run_procedure ("gimp-convolve",
 
236
                                    &nreturn_vals,
 
237
                                    GIMP_PDB_DRAWABLE, drawable_ID,
 
238
                                    GIMP_PDB_FLOAT, pressure,
 
239
                                    GIMP_PDB_INT32, convolve_type,
 
240
                                    GIMP_PDB_INT32, num_strokes,
 
241
                                    GIMP_PDB_FLOATARRAY, strokes,
 
242
                                    GIMP_PDB_END);
243
243
 
244
244
  success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
245
245
 
258
258
 *
259
259
 * This tool convolves the specified drawable with either a sharpening
260
260
 * or blurring kernel. This function performs exactly the same as the
261
 
 * gimp_convolve function except that the tools arguments are obtained
262
 
 * from the convolve option dialog. It this dialog has not been
263
 
 * activated then the dialogs default values will be used.
 
261
 * gimp_convolve() function except that the tools arguments are
 
262
 * obtained from the convolve option dialog. It this dialog has not
 
263
 * been activated then the dialogs default values will be used.
264
264
 *
265
265
 * Returns: TRUE on success.
266
266
 */
267
267
gboolean
268
268
gimp_convolve_default (gint32         drawable_ID,
269
 
                       gint           num_strokes,
270
 
                       const gdouble *strokes)
 
269
                       gint           num_strokes,
 
270
                       const gdouble *strokes)
271
271
{
272
272
  GimpParam *return_vals;
273
273
  gint nreturn_vals;
274
274
  gboolean success = TRUE;
275
275
 
276
 
  return_vals = gimp_run_procedure ("gimp_convolve_default",
277
 
                                    &nreturn_vals,
278
 
                                    GIMP_PDB_DRAWABLE, drawable_ID,
279
 
                                    GIMP_PDB_INT32, num_strokes,
280
 
                                    GIMP_PDB_FLOATARRAY, strokes,
281
 
                                    GIMP_PDB_END);
 
276
  return_vals = gimp_run_procedure ("gimp-convolve-default",
 
277
                                    &nreturn_vals,
 
278
                                    GIMP_PDB_DRAWABLE, drawable_ID,
 
279
                                    GIMP_PDB_INT32, num_strokes,
 
280
                                    GIMP_PDB_FLOATARRAY, strokes,
 
281
                                    GIMP_PDB_END);
282
282
 
283
283
  success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
284
284
 
290
290
/**
291
291
 * gimp_dodgeburn:
292
292
 * @drawable_ID: The affected drawable.
293
 
 * @exposure: The exposer of the strokes.
 
293
 * @exposure: The exposure of the strokes.
294
294
 * @dodgeburn_type: The type either dodge or burn.
295
295
 * @dodgeburn_mode: The mode.
296
296
 * @num_strokes: Number of stroke control points (count each coordinate as 2 points).
304
304
 */
305
305
gboolean
306
306
gimp_dodgeburn (gint32             drawable_ID,
307
 
                gdouble            exposure,
308
 
                GimpDodgeBurnType  dodgeburn_type,
309
 
                GimpTransferMode   dodgeburn_mode,
310
 
                gint               num_strokes,
311
 
                const gdouble     *strokes)
 
307
                gdouble            exposure,
 
308
                GimpDodgeBurnType  dodgeburn_type,
 
309
                GimpTransferMode   dodgeburn_mode,
 
310
                gint               num_strokes,
 
311
                const gdouble     *strokes)
312
312
{
313
313
  GimpParam *return_vals;
314
314
  gint nreturn_vals;
315
315
  gboolean success = TRUE;
316
316
 
317
 
  return_vals = gimp_run_procedure ("gimp_dodgeburn",
318
 
                                    &nreturn_vals,
319
 
                                    GIMP_PDB_DRAWABLE, drawable_ID,
320
 
                                    GIMP_PDB_FLOAT, exposure,
321
 
                                    GIMP_PDB_INT32, dodgeburn_type,
322
 
                                    GIMP_PDB_INT32, dodgeburn_mode,
323
 
                                    GIMP_PDB_INT32, num_strokes,
324
 
                                    GIMP_PDB_FLOATARRAY, strokes,
325
 
                                    GIMP_PDB_END);
 
317
  return_vals = gimp_run_procedure ("gimp-dodgeburn",
 
318
                                    &nreturn_vals,
 
319
                                    GIMP_PDB_DRAWABLE, drawable_ID,
 
320
                                    GIMP_PDB_FLOAT, exposure,
 
321
                                    GIMP_PDB_INT32, dodgeburn_type,
 
322
                                    GIMP_PDB_INT32, dodgeburn_mode,
 
323
                                    GIMP_PDB_INT32, num_strokes,
 
324
                                    GIMP_PDB_FLOATARRAY, strokes,
 
325
                                    GIMP_PDB_END);
326
326
 
327
327
  success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
328
328
 
338
338
 * @strokes: Array of stroke coordinates: { s1.x, s1.y, s2.x, s2.y, ..., sn.x, sn.y }.
339
339
 *
340
340
 * Dodgeburn image with varying exposure. This is the same as the
341
 
 * gimp_dodgeburn function except that the exposure, type and mode are
342
 
 * taken from the tools option dialog. If the dialog has not been
 
341
 * gimp_dodgeburn() function except that the exposure, type and mode
 
342
 * are taken from the tools option dialog. If the dialog has not been
343
343
 * activated then the defaults as used by the dialog will be used.
344
344
 *
345
345
 * Dodgeburn. More details here later.
348
348
 */
349
349
gboolean
350
350
gimp_dodgeburn_default (gint32         drawable_ID,
351
 
                        gint           num_strokes,
352
 
                        const gdouble *strokes)
 
351
                        gint           num_strokes,
 
352
                        const gdouble *strokes)
353
353
{
354
354
  GimpParam *return_vals;
355
355
  gint nreturn_vals;
356
356
  gboolean success = TRUE;
357
357
 
358
 
  return_vals = gimp_run_procedure ("gimp_dodgeburn_default",
359
 
                                    &nreturn_vals,
360
 
                                    GIMP_PDB_DRAWABLE, drawable_ID,
361
 
                                    GIMP_PDB_INT32, num_strokes,
362
 
                                    GIMP_PDB_FLOATARRAY, strokes,
363
 
                                    GIMP_PDB_END);
 
358
  return_vals = gimp_run_procedure ("gimp-dodgeburn-default",
 
359
                                    &nreturn_vals,
 
360
                                    GIMP_PDB_DRAWABLE, drawable_ID,
 
361
                                    GIMP_PDB_INT32, num_strokes,
 
362
                                    GIMP_PDB_FLOATARRAY, strokes,
 
363
                                    GIMP_PDB_END);
364
364
 
365
365
  success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
366
366
 
374
374
 * @drawable_ID: The affected drawable.
375
375
 * @num_strokes: Number of stroke control points (count each coordinate as 2 points).
376
376
 * @strokes: Array of stroke coordinates: { s1.x, s1.y, s2.x, s2.y, ..., sn.x, sn.y }.
377
 
 * @hardness: %%desc%%.
378
 
 * @method: %%desc%%.
 
377
 * @hardness: How to apply the brush.
 
378
 * @method: The paint method to use.
379
379
 *
380
380
 * Erase using the current brush.
381
381
 *
389
389
 */
390
390
gboolean
391
391
gimp_eraser (gint32                    drawable_ID,
392
 
             gint                      num_strokes,
393
 
             const gdouble            *strokes,
394
 
             GimpBrushApplicationMode  hardness,
395
 
             GimpPaintApplicationMode  method)
 
392
             gint                      num_strokes,
 
393
             const gdouble            *strokes,
 
394
             GimpBrushApplicationMode  hardness,
 
395
             GimpPaintApplicationMode  method)
396
396
{
397
397
  GimpParam *return_vals;
398
398
  gint nreturn_vals;
399
399
  gboolean success = TRUE;
400
400
 
401
 
  return_vals = gimp_run_procedure ("gimp_eraser",
402
 
                                    &nreturn_vals,
403
 
                                    GIMP_PDB_DRAWABLE, drawable_ID,
404
 
                                    GIMP_PDB_INT32, num_strokes,
405
 
                                    GIMP_PDB_FLOATARRAY, strokes,
406
 
                                    GIMP_PDB_INT32, hardness,
407
 
                                    GIMP_PDB_INT32, method,
408
 
                                    GIMP_PDB_END);
 
401
  return_vals = gimp_run_procedure ("gimp-eraser",
 
402
                                    &nreturn_vals,
 
403
                                    GIMP_PDB_DRAWABLE, drawable_ID,
 
404
                                    GIMP_PDB_INT32, num_strokes,
 
405
                                    GIMP_PDB_FLOATARRAY, strokes,
 
406
                                    GIMP_PDB_INT32, hardness,
 
407
                                    GIMP_PDB_INT32, method,
 
408
                                    GIMP_PDB_END);
409
409
 
410
410
  success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
411
411
 
423
423
 * Erase using the current brush.
424
424
 *
425
425
 * This tool erases using the current brush mask. This function
426
 
 * performs exactly the same as the gimp_eraser function except that
 
426
 * performs exactly the same as the gimp_eraser() function except that
427
427
 * the tools arguments are obtained from the eraser option dialog. It
428
428
 * this dialog has not been activated then the dialogs default values
429
429
 * will be used.
432
432
 */
433
433
gboolean
434
434
gimp_eraser_default (gint32         drawable_ID,
435
 
                     gint           num_strokes,
436
 
                     const gdouble *strokes)
437
 
{
438
 
  GimpParam *return_vals;
439
 
  gint nreturn_vals;
440
 
  gboolean success = TRUE;
441
 
 
442
 
  return_vals = gimp_run_procedure ("gimp_eraser_default",
443
 
                                    &nreturn_vals,
444
 
                                    GIMP_PDB_DRAWABLE, drawable_ID,
445
 
                                    GIMP_PDB_INT32, num_strokes,
446
 
                                    GIMP_PDB_FLOATARRAY, strokes,
447
 
                                    GIMP_PDB_END);
 
435
                     gint           num_strokes,
 
436
                     const gdouble *strokes)
 
437
{
 
438
  GimpParam *return_vals;
 
439
  gint nreturn_vals;
 
440
  gboolean success = TRUE;
 
441
 
 
442
  return_vals = gimp_run_procedure ("gimp-eraser-default",
 
443
                                    &nreturn_vals,
 
444
                                    GIMP_PDB_DRAWABLE, drawable_ID,
 
445
                                    GIMP_PDB_INT32, num_strokes,
 
446
                                    GIMP_PDB_FLOATARRAY, strokes,
 
447
                                    GIMP_PDB_END);
 
448
 
 
449
  success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
 
450
 
 
451
  gimp_destroy_params (return_vals, nreturn_vals);
 
452
 
 
453
  return success;
 
454
}
 
455
 
 
456
/**
 
457
 * gimp_heal:
 
458
 * @drawable_ID: The affected drawable.
 
459
 * @src_drawable_ID: The source drawable.
 
460
 * @src_x: The x coordinate in the source image.
 
461
 * @src_y: The y coordinate in the source image.
 
462
 * @num_strokes: Number of stroke control points (count each coordinate as 2 points).
 
463
 * @strokes: Array of stroke coordinates: { s1.x, s1.y, s2.x, s2.y, ..., sn.x, sn.y }.
 
464
 *
 
465
 * Heal from the source to the dest drawable using the current brush
 
466
 *
 
467
 * This tool heals the source drawable starting at the specified source
 
468
 * coordinates to the dest drawable. For image healing, if the sum of
 
469
 * the src coordinates and subsequent stroke offsets exceeds the
 
470
 * extents of the src drawable, then no paint is transferred. The
 
471
 * healing tool is capable of transforming between any image types
 
472
 * except RGB-&gt;Indexed.
 
473
 *
 
474
 * Returns: TRUE on success.
 
475
 *
 
476
 * Since: GIMP 2.4
 
477
 */
 
478
gboolean
 
479
gimp_heal (gint32         drawable_ID,
 
480
           gint32         src_drawable_ID,
 
481
           gdouble        src_x,
 
482
           gdouble        src_y,
 
483
           gint           num_strokes,
 
484
           const gdouble *strokes)
 
485
{
 
486
  GimpParam *return_vals;
 
487
  gint nreturn_vals;
 
488
  gboolean success = TRUE;
 
489
 
 
490
  return_vals = gimp_run_procedure ("gimp-heal",
 
491
                                    &nreturn_vals,
 
492
                                    GIMP_PDB_DRAWABLE, drawable_ID,
 
493
                                    GIMP_PDB_DRAWABLE, src_drawable_ID,
 
494
                                    GIMP_PDB_FLOAT, src_x,
 
495
                                    GIMP_PDB_FLOAT, src_y,
 
496
                                    GIMP_PDB_INT32, num_strokes,
 
497
                                    GIMP_PDB_FLOATARRAY, strokes,
 
498
                                    GIMP_PDB_END);
 
499
 
 
500
  success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
 
501
 
 
502
  gimp_destroy_params (return_vals, nreturn_vals);
 
503
 
 
504
  return success;
 
505
}
 
506
 
 
507
/**
 
508
 * gimp_heal_default:
 
509
 * @drawable_ID: The affected drawable.
 
510
 * @num_strokes: Number of stroke control points (count each coordinate as 2 points).
 
511
 * @strokes: Array of stroke coordinates: { s1.x, s1.y, s2.x, s2.y, ..., sn.x, sn.y }.
 
512
 *
 
513
 * Heal from the source to the dest drawable using the current brush
 
514
 *
 
515
 * This tool heals from the source drawable starting at the specified
 
516
 * source coordinates to the dest drawable. This function performs
 
517
 * exactly the same as the gimp_heal() function except that the tools
 
518
 * arguments are obtained from the healing option dialog. It this
 
519
 * dialog has not been activated then the dialogs default values will
 
520
 * be used.
 
521
 *
 
522
 * Returns: TRUE on success.
 
523
 *
 
524
 * Since: GIMP 2.4
 
525
 */
 
526
gboolean
 
527
gimp_heal_default (gint32         drawable_ID,
 
528
                   gint           num_strokes,
 
529
                   const gdouble *strokes)
 
530
{
 
531
  GimpParam *return_vals;
 
532
  gint nreturn_vals;
 
533
  gboolean success = TRUE;
 
534
 
 
535
  return_vals = gimp_run_procedure ("gimp-heal-default",
 
536
                                    &nreturn_vals,
 
537
                                    GIMP_PDB_DRAWABLE, drawable_ID,
 
538
                                    GIMP_PDB_INT32, num_strokes,
 
539
                                    GIMP_PDB_FLOATARRAY, strokes,
 
540
                                    GIMP_PDB_END);
448
541
 
449
542
  success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
450
543
 
459
552
 * @fade_out: Fade out parameter.
460
553
 * @num_strokes: Number of stroke control points (count each coordinate as 2 points).
461
554
 * @strokes: Array of stroke coordinates: { s1.x, s1.y, s2.x, s2.y, ..., sn.x, sn.y }.
462
 
 * @method: %%desc%%.
 
555
 * @method: The paint method to use.
463
556
 * @gradient_length: Length of gradient to draw.
464
557
 *
465
558
 * Paint in the current brush with optional fade out parameter and pull
468
561
 * This tool is the standard paintbrush. It draws linearly interpolated
469
562
 * lines through the specified stroke coordinates. It operates on the
470
563
 * specified drawable in the foreground color with the active brush.
471
 
 * The \"fade_out\" parameter is measured in pixels and allows the
472
 
 * brush stroke to linearly fall off. The pressure is set to the
473
 
 * maximum at the beginning of the stroke. As the distance of the
474
 
 * stroke nears the fade_out value, the pressure will approach zero.
475
 
 * The gradient_length is the distance to spread the gradient over. It
476
 
 * is measured in pixels. If the gradient_length is 0, no gradient is
477
 
 * used.
 
564
 * The 'fade-out' parameter is measured in pixels and allows the brush
 
565
 * stroke to linearly fall off. The pressure is set to the maximum at
 
566
 * the beginning of the stroke. As the distance of the stroke nears the
 
567
 * fade-out value, the pressure will approach zero. The gradient-length
 
568
 * is the distance to spread the gradient over. It is measured in
 
569
 * pixels. If the gradient-length is 0, no gradient is used.
478
570
 *
479
571
 * Returns: TRUE on success.
480
572
 */
481
573
gboolean
482
574
gimp_paintbrush (gint32                    drawable_ID,
483
 
                 gdouble                   fade_out,
484
 
                 gint                      num_strokes,
485
 
                 const gdouble            *strokes,
486
 
                 GimpPaintApplicationMode  method,
487
 
                 gdouble                   gradient_length)
 
575
                 gdouble                   fade_out,
 
576
                 gint                      num_strokes,
 
577
                 const gdouble            *strokes,
 
578
                 GimpPaintApplicationMode  method,
 
579
                 gdouble                   gradient_length)
488
580
{
489
581
  GimpParam *return_vals;
490
582
  gint nreturn_vals;
491
583
  gboolean success = TRUE;
492
584
 
493
 
  return_vals = gimp_run_procedure ("gimp_paintbrush",
494
 
                                    &nreturn_vals,
495
 
                                    GIMP_PDB_DRAWABLE, drawable_ID,
496
 
                                    GIMP_PDB_FLOAT, fade_out,
497
 
                                    GIMP_PDB_INT32, num_strokes,
498
 
                                    GIMP_PDB_FLOATARRAY, strokes,
499
 
                                    GIMP_PDB_INT32, method,
500
 
                                    GIMP_PDB_FLOAT, gradient_length,
501
 
                                    GIMP_PDB_END);
 
585
  return_vals = gimp_run_procedure ("gimp-paintbrush",
 
586
                                    &nreturn_vals,
 
587
                                    GIMP_PDB_DRAWABLE, drawable_ID,
 
588
                                    GIMP_PDB_FLOAT, fade_out,
 
589
                                    GIMP_PDB_INT32, num_strokes,
 
590
                                    GIMP_PDB_FLOATARRAY, strokes,
 
591
                                    GIMP_PDB_INT32, method,
 
592
                                    GIMP_PDB_FLOAT, gradient_length,
 
593
                                    GIMP_PDB_END);
502
594
 
503
595
  success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
504
596
 
521
613
 * This tool is similar to the standard paintbrush. It draws linearly
522
614
 * interpolated lines through the specified stroke coordinates. It
523
615
 * operates on the specified drawable in the foreground color with the
524
 
 * active brush. The \"fade_out\" parameter is measured in pixels and
 
616
 * active brush. The 'fade-out' parameter is measured in pixels and
525
617
 * allows the brush stroke to linearly fall off (value obtained from
526
618
 * the option dialog). The pressure is set to the maximum at the
527
619
 * beginning of the stroke. As the distance of the stroke nears the
528
 
 * fade_out value, the pressure will approach zero. The gradient_length
 
620
 * fade-out value, the pressure will approach zero. The gradient-length
529
621
 * (value obtained from the option dialog) is the distance to spread
530
 
 * the gradient over. It is measured in pixels. If the gradient_length
 
622
 * the gradient over. It is measured in pixels. If the gradient-length
531
623
 * is 0, no gradient is used.
532
624
 *
533
625
 * Returns: TRUE on success.
534
626
 */
535
627
gboolean
536
628
gimp_paintbrush_default (gint32         drawable_ID,
537
 
                         gint           num_strokes,
538
 
                         const gdouble *strokes)
 
629
                         gint           num_strokes,
 
630
                         const gdouble *strokes)
539
631
{
540
632
  GimpParam *return_vals;
541
633
  gint nreturn_vals;
542
634
  gboolean success = TRUE;
543
635
 
544
 
  return_vals = gimp_run_procedure ("gimp_paintbrush_default",
545
 
                                    &nreturn_vals,
546
 
                                    GIMP_PDB_DRAWABLE, drawable_ID,
547
 
                                    GIMP_PDB_INT32, num_strokes,
548
 
                                    GIMP_PDB_FLOATARRAY, strokes,
549
 
                                    GIMP_PDB_END);
 
636
  return_vals = gimp_run_procedure ("gimp-paintbrush-default",
 
637
                                    &nreturn_vals,
 
638
                                    GIMP_PDB_DRAWABLE, drawable_ID,
 
639
                                    GIMP_PDB_INT32, num_strokes,
 
640
                                    GIMP_PDB_FLOATARRAY, strokes,
 
641
                                    GIMP_PDB_END);
550
642
 
551
643
  success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
552
644
 
574
666
 */
575
667
gboolean
576
668
gimp_pencil (gint32         drawable_ID,
577
 
             gint           num_strokes,
578
 
             const gdouble *strokes)
 
669
             gint           num_strokes,
 
670
             const gdouble *strokes)
579
671
{
580
672
  GimpParam *return_vals;
581
673
  gint nreturn_vals;
582
674
  gboolean success = TRUE;
583
675
 
584
 
  return_vals = gimp_run_procedure ("gimp_pencil",
585
 
                                    &nreturn_vals,
586
 
                                    GIMP_PDB_DRAWABLE, drawable_ID,
587
 
                                    GIMP_PDB_INT32, num_strokes,
588
 
                                    GIMP_PDB_FLOATARRAY, strokes,
589
 
                                    GIMP_PDB_END);
 
676
  return_vals = gimp_run_procedure ("gimp-pencil",
 
677
                                    &nreturn_vals,
 
678
                                    GIMP_PDB_DRAWABLE, drawable_ID,
 
679
                                    GIMP_PDB_INT32, num_strokes,
 
680
                                    GIMP_PDB_FLOATARRAY, strokes,
 
681
                                    GIMP_PDB_END);
590
682
 
591
683
  success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
592
684
 
612
704
 */
613
705
gboolean
614
706
gimp_smudge (gint32         drawable_ID,
615
 
             gdouble        pressure,
616
 
             gint           num_strokes,
617
 
             const gdouble *strokes)
 
707
             gdouble        pressure,
 
708
             gint           num_strokes,
 
709
             const gdouble *strokes)
618
710
{
619
711
  GimpParam *return_vals;
620
712
  gint nreturn_vals;
621
713
  gboolean success = TRUE;
622
714
 
623
 
  return_vals = gimp_run_procedure ("gimp_smudge",
624
 
                                    &nreturn_vals,
625
 
                                    GIMP_PDB_DRAWABLE, drawable_ID,
626
 
                                    GIMP_PDB_FLOAT, pressure,
627
 
                                    GIMP_PDB_INT32, num_strokes,
628
 
                                    GIMP_PDB_FLOATARRAY, strokes,
629
 
                                    GIMP_PDB_END);
 
715
  return_vals = gimp_run_procedure ("gimp-smudge",
 
716
                                    &nreturn_vals,
 
717
                                    GIMP_PDB_DRAWABLE, drawable_ID,
 
718
                                    GIMP_PDB_FLOAT, pressure,
 
719
                                    GIMP_PDB_INT32, num_strokes,
 
720
                                    GIMP_PDB_FLOATARRAY, strokes,
 
721
                                    GIMP_PDB_END);
630
722
 
631
723
  success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
632
724
 
644
736
 * Smudge image with varying pressure.
645
737
 *
646
738
 * This tool simulates a smudge using the current brush. It behaves
647
 
 * exactly the same as gimp_smudge except that the pressure value is
 
739
 * exactly the same as gimp_smudge() except that the pressure value is
648
740
 * taken from the smudge tool options or the options default if the
649
741
 * tools option dialog has not been activated.
650
742
 *
652
744
 */
653
745
gboolean
654
746
gimp_smudge_default (gint32         drawable_ID,
655
 
                     gint           num_strokes,
656
 
                     const gdouble *strokes)
 
747
                     gint           num_strokes,
 
748
                     const gdouble *strokes)
657
749
{
658
750
  GimpParam *return_vals;
659
751
  gint nreturn_vals;
660
752
  gboolean success = TRUE;
661
753
 
662
 
  return_vals = gimp_run_procedure ("gimp_smudge_default",
663
 
                                    &nreturn_vals,
664
 
                                    GIMP_PDB_DRAWABLE, drawable_ID,
665
 
                                    GIMP_PDB_INT32, num_strokes,
666
 
                                    GIMP_PDB_FLOATARRAY, strokes,
667
 
                                    GIMP_PDB_END);
 
754
  return_vals = gimp_run_procedure ("gimp-smudge-default",
 
755
                                    &nreturn_vals,
 
756
                                    GIMP_PDB_DRAWABLE, drawable_ID,
 
757
                                    GIMP_PDB_INT32, num_strokes,
 
758
                                    GIMP_PDB_FLOATARRAY, strokes,
 
759
                                    GIMP_PDB_END);
668
760
 
669
761
  success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
670
762