919
471
success = paint_tools_stroke (gimp, context, options, drawable,
920
num_strokes, strokes);
924
return procedural_db_return_args (&eraser_proc, success);
927
static ProcArg eraser_inargs[] =
932
"The affected drawable"
937
"Number of stroke control points (count each coordinate as 2 points)"
942
"Array of stroke coordinates: { s1.x, s1.y, s2.x, s2.y, ..., sn.x, sn.y }"
947
"GIMP_BRUSH_HARD (0) or GIMP_BRUSH_SOFT (1)"
952
"GIMP_PAINT_CONSTANT (0) or GIMP_PAINT_INCREMENTAL (1)"
956
static ProcRecord eraser_proc =
959
"Erase using the current brush.",
960
"This tool erases using the current brush mask. If the specified drawable contains an alpha channel, then the erased pixels will become transparent. Otherwise, the eraser tool replaces the contents of the drawable with the background color. Like paintbrush, this tool linearly interpolates between the specified stroke coordinates.",
961
"Spencer Kimball & Peter Mattis",
962
"Spencer Kimball & Peter Mattis",
970
{ { eraser_invoker } }
974
eraser_default_invoker (Gimp *gimp,
975
GimpContext *context,
976
GimpProgress *progress,
979
gboolean success = TRUE;
980
GimpDrawable *drawable;
984
drawable = (GimpDrawable *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
985
if (! (GIMP_IS_DRAWABLE (drawable) && ! gimp_item_is_removed (GIMP_ITEM (drawable))))
988
num_strokes = args[1].value.pdb_int;
989
if (!(num_strokes < 2))
994
strokes = (gdouble *) args[2].value.pdb_pointer;
998
GimpPaintInfo *info = (GimpPaintInfo *)
999
gimp_container_get_child_by_name (gimp->paint_info_list, "GimpEraser");
1001
success = (info && gimp_item_is_attached (GIMP_ITEM (drawable)));
1005
GimpPaintOptions *options = gimp_paint_options_new (info);
1007
success = paint_tools_stroke (gimp, context, options, drawable,
1008
num_strokes, strokes);
1012
return procedural_db_return_args (&eraser_default_proc, success);
1015
static ProcArg eraser_default_inargs[] =
1020
"The affected drawable"
1025
"Number of stroke control points (count each coordinate as 2 points)"
1028
GIMP_PDB_FLOATARRAY,
1030
"Array of stroke coordinates: { s1.x, s1.y, s2.x, s2.y, ..., sn.x, sn.y }"
1034
static ProcRecord eraser_default_proc =
1036
"gimp_eraser_default",
1037
"Erase using the current brush.",
1038
"This tool erases using the current brush mask. This function performs exactly the same as the gimp_eraser function except that the tools arguments are obtained from the eraser option dialog. It this dialog has not been activated then the dialogs default values will be used.",
1045
eraser_default_inargs,
1048
{ { eraser_default_invoker } }
1052
paintbrush_invoker (Gimp *gimp,
1053
GimpContext *context,
1054
GimpProgress *progress,
472
num_strokes, strokes,
473
"undo-desc", info->blurb,
478
return gimp_procedure_get_return_values (procedure, success);
482
eraser_default_invoker (GimpProcedure *procedure,
484
GimpContext *context,
485
GimpProgress *progress,
486
const GValueArray *args)
488
gboolean success = TRUE;
489
GimpDrawable *drawable;
491
const gdouble *strokes;
493
drawable = gimp_value_get_drawable (&args->values[0], gimp);
494
num_strokes = g_value_get_int (&args->values[1]);
495
strokes = gimp_value_get_floatarray (&args->values[2]);
499
GimpPaintInfo *info = (GimpPaintInfo *)
500
gimp_container_get_child_by_name (gimp->paint_info_list, "gimp-eraser");
502
success = (info && gimp_item_is_attached (GIMP_ITEM (drawable)));
506
GimpPaintOptions *options = gimp_paint_options_new (info);
508
success = paint_tools_stroke (gimp, context, options, drawable,
509
num_strokes, strokes,
510
"undo-desc", info->blurb,
515
return gimp_procedure_get_return_values (procedure, success);
519
heal_invoker (GimpProcedure *procedure,
521
GimpContext *context,
522
GimpProgress *progress,
523
const GValueArray *args)
525
gboolean success = TRUE;
526
GimpDrawable *drawable;
527
GimpDrawable *src_drawable;
531
const gdouble *strokes;
533
drawable = gimp_value_get_drawable (&args->values[0], gimp);
534
src_drawable = gimp_value_get_drawable (&args->values[1], gimp);
535
src_x = g_value_get_double (&args->values[2]);
536
src_y = g_value_get_double (&args->values[3]);
537
num_strokes = g_value_get_int (&args->values[4]);
538
strokes = gimp_value_get_floatarray (&args->values[5]);
542
GimpPaintInfo *info = (GimpPaintInfo *)
543
gimp_container_get_child_by_name (gimp->paint_info_list, "gimp-heal");
545
success = (info && gimp_item_is_attached (GIMP_ITEM (drawable)));
549
GimpPaintOptions *options = gimp_paint_options_new (info);
551
success = paint_tools_stroke (gimp, context, options, drawable,
552
num_strokes, strokes,
553
"undo-desc", info->blurb,
554
"src-drawable", src_drawable,
561
return gimp_procedure_get_return_values (procedure, success);
565
heal_default_invoker (GimpProcedure *procedure,
567
GimpContext *context,
568
GimpProgress *progress,
569
const GValueArray *args)
571
gboolean success = TRUE;
572
GimpDrawable *drawable;
574
const gdouble *strokes;
576
drawable = gimp_value_get_drawable (&args->values[0], gimp);
577
num_strokes = g_value_get_int (&args->values[1]);
578
strokes = gimp_value_get_floatarray (&args->values[2]);
582
GimpPaintInfo *info = (GimpPaintInfo *)
583
gimp_container_get_child_by_name (gimp->paint_info_list, "gimp-heal");
585
success = (info && gimp_item_is_attached (GIMP_ITEM (drawable)));
589
GimpPaintOptions *options = gimp_paint_options_new (info);
591
success = paint_tools_stroke (gimp, context, options, drawable,
592
num_strokes, strokes,
593
"undo-desc", info->blurb,
598
return gimp_procedure_get_return_values (procedure, success);
602
paintbrush_invoker (GimpProcedure *procedure,
604
GimpContext *context,
605
GimpProgress *progress,
606
const GValueArray *args)
1057
608
gboolean success = TRUE;
1058
609
GimpDrawable *drawable;
1059
610
gdouble fade_out;
1060
611
gint32 num_strokes;
612
const gdouble *strokes;
1063
614
gdouble gradient_length;
1065
drawable = (GimpDrawable *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
1066
if (! (GIMP_IS_DRAWABLE (drawable) && ! gimp_item_is_removed (GIMP_ITEM (drawable))))
1069
fade_out = args[1].value.pdb_float;
1073
num_strokes = args[2].value.pdb_int;
1074
if (!(num_strokes < 2))
1079
strokes = (gdouble *) args[3].value.pdb_pointer;
1081
method = args[4].value.pdb_int;
1082
if (method < GIMP_PAINT_CONSTANT || method > GIMP_PAINT_INCREMENTAL)
1085
gradient_length = args[5].value.pdb_float;
1086
if (gradient_length < 0.0)
616
drawable = gimp_value_get_drawable (&args->values[0], gimp);
617
fade_out = g_value_get_double (&args->values[1]);
618
num_strokes = g_value_get_int (&args->values[2]);
619
strokes = gimp_value_get_floatarray (&args->values[3]);
620
method = g_value_get_enum (&args->values[4]);
621
gradient_length = g_value_get_double (&args->values[5]);
1091
625
GimpPaintInfo *info = (GimpPaintInfo *)
1092
gimp_container_get_child_by_name (gimp->paint_info_list, "GimpPaintbrush");
626
gimp_container_get_child_by_name (gimp->paint_info_list, "gimp-paintbrush");
1094
628
success = (info && gimp_item_is_attached (GIMP_ITEM (drawable)));
1108
642
success = paint_tools_stroke (gimp, context, options, drawable,
1109
num_strokes, strokes);
1113
return procedural_db_return_args (&paintbrush_proc, success);
1116
static ProcArg paintbrush_inargs[] =
1121
"The affected drawable"
1126
"Fade out parameter: 0 <= fade_out"
1131
"Number of stroke control points (count each coordinate as 2 points)"
1134
GIMP_PDB_FLOATARRAY,
1136
"Array of stroke coordinates: { s1.x, s1.y, s2.x, s2.y, ..., sn.x, sn.y }"
1141
"GIMP_PAINT_CONSTANT (0) or GIMP_PAINT_INCREMENTAL (1)"
1146
"Length of gradient to draw: 0 <= gradient_length"
1150
static ProcRecord paintbrush_proc =
1153
"Paint in the current brush with optional fade out parameter and pull colors from a gradient.",
1154
"This tool is the standard paintbrush. It draws linearly interpolated lines through the specified stroke coordinates. It operates on the specified drawable in the foreground color with the active brush. The \"fade_out\" parameter is measured in pixels and allows the brush stroke to linearly fall off. The pressure is set to the maximum at the beginning of the stroke. As the distance of the stroke nears the fade_out value, the pressure will approach zero. The gradient_length is the distance to spread the gradient over. It is measured in pixels. If the gradient_length is 0, no gradient is used.",
1155
"Spencer Kimball & Peter Mattis",
1156
"Spencer Kimball & Peter Mattis",
1164
{ { paintbrush_invoker } }
1168
paintbrush_default_invoker (Gimp *gimp,
1169
GimpContext *context,
1170
GimpProgress *progress,
1173
gboolean success = TRUE;
1174
GimpDrawable *drawable;
1178
drawable = (GimpDrawable *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
1179
if (! (GIMP_IS_DRAWABLE (drawable) && ! gimp_item_is_removed (GIMP_ITEM (drawable))))
1182
num_strokes = args[1].value.pdb_int;
1183
if (!(num_strokes < 2))
1188
strokes = (gdouble *) args[2].value.pdb_pointer;
1192
GimpPaintInfo *info = (GimpPaintInfo *)
1193
gimp_container_get_child_by_name (gimp->paint_info_list, "GimpPaintbrush");
1195
success = (info && gimp_item_is_attached (GIMP_ITEM (drawable)));
1199
GimpPaintOptions *options = gimp_paint_options_new (info);
1201
success = paint_tools_stroke (gimp, context, options, drawable,
1202
num_strokes, strokes);
1206
return procedural_db_return_args (&paintbrush_default_proc, success);
1209
static ProcArg paintbrush_default_inargs[] =
1214
"The affected drawable"
1219
"Number of stroke control points (count each coordinate as 2 points)"
1222
GIMP_PDB_FLOATARRAY,
1224
"Array of stroke coordinates: { s1.x, s1.y, s2.x, s2.y, ..., sn.x, sn.y }"
1228
static ProcRecord paintbrush_default_proc =
1230
"gimp_paintbrush_default",
1231
"Paint in the current brush. The fade out parameter and pull colors from a gradient parameter are set from the paintbrush options dialog. If this dialog has not been activated then the dialog defaults will be used.",
1232
"This tool is similar to the standard paintbrush. It draws linearly interpolated lines through the specified stroke coordinates. It operates on the specified drawable in the foreground color with the active brush. The \"fade_out\" parameter is measured in pixels and allows the brush stroke to linearly fall off (value obtained from the option dialog). The pressure is set to the maximum at the beginning of the stroke. As the distance of the stroke nears the fade_out value, the pressure will approach zero. The gradient_length (value obtained from the option dialog) is the distance to spread the gradient over. It is measured in pixels. If the gradient_length is 0, no gradient is used.",
1239
paintbrush_default_inargs,
1242
{ { paintbrush_default_invoker } }
1246
pencil_invoker (Gimp *gimp,
1247
GimpContext *context,
1248
GimpProgress *progress,
1251
gboolean success = TRUE;
1252
GimpDrawable *drawable;
1256
drawable = (GimpDrawable *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
1257
if (! (GIMP_IS_DRAWABLE (drawable) && ! gimp_item_is_removed (GIMP_ITEM (drawable))))
1260
num_strokes = args[1].value.pdb_int;
1261
if (!(num_strokes < 2))
1266
strokes = (gdouble *) args[2].value.pdb_pointer;
1270
GimpPaintInfo *info = (GimpPaintInfo *)
1271
gimp_container_get_child_by_name (gimp->paint_info_list, "GimpPencil");
1273
success = (info && gimp_item_is_attached (GIMP_ITEM (drawable)));
1277
GimpPaintOptions *options = gimp_paint_options_new (info);
1279
success = paint_tools_stroke (gimp, context, options, drawable,
1280
num_strokes, strokes);
1284
return procedural_db_return_args (&pencil_proc, success);
1287
static ProcArg pencil_inargs[] =
1292
"The affected drawable"
1297
"Number of stroke control points (count each coordinate as 2 points)"
1300
GIMP_PDB_FLOATARRAY,
1302
"Array of stroke coordinates: { s1.x, s1.y, s2.x, s2.y, ..., sn.x, sn.y }"
1306
static ProcRecord pencil_proc =
1309
"Paint in the current brush without sub-pixel sampling.",
1310
"This tool is the standard pencil. It draws linearly interpolated lines through the specified stroke coordinates. It operates on the specified drawable in the foreground color with the active brush. The brush mask is treated as though it contains only black and white values. Any value below half is treated as black; any above half, as white.",
1311
"Spencer Kimball & Peter Mattis",
1312
"Spencer Kimball & Peter Mattis",
1320
{ { pencil_invoker } }
1324
smudge_invoker (Gimp *gimp,
1325
GimpContext *context,
1326
GimpProgress *progress,
643
num_strokes, strokes,
644
"undo-desc", info->blurb,
649
return gimp_procedure_get_return_values (procedure, success);
653
paintbrush_default_invoker (GimpProcedure *procedure,
655
GimpContext *context,
656
GimpProgress *progress,
657
const GValueArray *args)
659
gboolean success = TRUE;
660
GimpDrawable *drawable;
662
const gdouble *strokes;
664
drawable = gimp_value_get_drawable (&args->values[0], gimp);
665
num_strokes = g_value_get_int (&args->values[1]);
666
strokes = gimp_value_get_floatarray (&args->values[2]);
670
GimpPaintInfo *info = (GimpPaintInfo *)
671
gimp_container_get_child_by_name (gimp->paint_info_list, "gimp-paintbrush");
673
success = (info && gimp_item_is_attached (GIMP_ITEM (drawable)));
677
GimpPaintOptions *options = gimp_paint_options_new (info);
679
success = paint_tools_stroke (gimp, context, options, drawable,
680
num_strokes, strokes,
681
"undo-desc", info->blurb,
686
return gimp_procedure_get_return_values (procedure, success);
690
pencil_invoker (GimpProcedure *procedure,
692
GimpContext *context,
693
GimpProgress *progress,
694
const GValueArray *args)
696
gboolean success = TRUE;
697
GimpDrawable *drawable;
699
const gdouble *strokes;
701
drawable = gimp_value_get_drawable (&args->values[0], gimp);
702
num_strokes = g_value_get_int (&args->values[1]);
703
strokes = gimp_value_get_floatarray (&args->values[2]);
707
GimpPaintInfo *info = (GimpPaintInfo *)
708
gimp_container_get_child_by_name (gimp->paint_info_list, "gimp-pencil");
710
success = (info && gimp_item_is_attached (GIMP_ITEM (drawable)));
714
GimpPaintOptions *options = gimp_paint_options_new (info);
716
success = paint_tools_stroke (gimp, context, options, drawable,
717
num_strokes, strokes,
718
"undo-desc", info->blurb,
723
return gimp_procedure_get_return_values (procedure, success);
727
smudge_invoker (GimpProcedure *procedure,
729
GimpContext *context,
730
GimpProgress *progress,
731
const GValueArray *args)
1329
733
gboolean success = TRUE;
1330
734
GimpDrawable *drawable;
1331
735
gdouble pressure;
1332
736
gint32 num_strokes;
1335
drawable = (GimpDrawable *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
1336
if (! (GIMP_IS_DRAWABLE (drawable) && ! gimp_item_is_removed (GIMP_ITEM (drawable))))
1339
pressure = args[1].value.pdb_float;
1340
if (pressure < 0.0 || pressure > 100.0)
1343
num_strokes = args[2].value.pdb_int;
1344
if (!(num_strokes < 2))
1349
strokes = (gdouble *) args[3].value.pdb_pointer;
737
const gdouble *strokes;
739
drawable = gimp_value_get_drawable (&args->values[0], gimp);
740
pressure = g_value_get_double (&args->values[1]);
741
num_strokes = g_value_get_int (&args->values[2]);
742
strokes = gimp_value_get_floatarray (&args->values[3]);
1353
746
GimpPaintInfo *info = (GimpPaintInfo *)
1354
gimp_container_get_child_by_name (gimp->paint_info_list, "GimpSmudge");
747
gimp_container_get_child_by_name (gimp->paint_info_list, "gimp-smudge");
1356
749
success = (info && gimp_item_is_attached (GIMP_ITEM (drawable)));
1447
794
GimpPaintOptions *options = gimp_paint_options_new (info);
1449
796
success = paint_tools_stroke (gimp, context, options, drawable,
1450
num_strokes, strokes);
797
num_strokes, strokes,
798
"undo-desc", info->blurb,
1454
return procedural_db_return_args (&smudge_default_proc, success);
1457
static ProcArg smudge_default_inargs[] =
1462
"The affected drawable"
1467
"Number of stroke control points (count each coordinate as 2 points)"
1470
GIMP_PDB_FLOATARRAY,
1472
"Array of stroke coordinates: { s1.x, s1.y, s2.x, s2.y, ..., sn.x, sn.y }"
1476
static ProcRecord smudge_default_proc =
1478
"gimp_smudge_default",
1479
"Smudge image with varying pressure.",
1480
"This tool simulates a smudge using the current brush. It behaves exactly the same as gimp_smudge except that the pressure value is taken from the smudge tool options or the options default if the tools option dialog has not been activated.",
1487
smudge_default_inargs,
1490
{ { smudge_default_invoker } }
803
return gimp_procedure_get_return_values (procedure, success);
807
register_paint_tools_procs (GimpPDB *pdb)
809
GimpProcedure *procedure;
814
procedure = gimp_procedure_new (airbrush_invoker);
815
gimp_object_set_static_name (GIMP_OBJECT (procedure), "gimp-airbrush");
816
gimp_procedure_set_static_strings (procedure,
818
"Paint in the current brush with varying pressure. Paint application is time-dependent.",
819
"This tool simulates the use of an airbrush. Paint pressure represents the relative intensity of the paint application. High pressure results in a thicker layer of paint while low pressure results in a thinner layer.",
820
"Spencer Kimball & Peter Mattis",
821
"Spencer Kimball & Peter Mattis",
824
gimp_procedure_add_argument (procedure,
825
gimp_param_spec_drawable_id ("drawable",
827
"The affected drawable",
829
GIMP_PARAM_READWRITE));
830
gimp_procedure_add_argument (procedure,
831
g_param_spec_double ("pressure",
833
"The pressure of the airbrush strokes",
835
GIMP_PARAM_READWRITE));
836
gimp_procedure_add_argument (procedure,
837
gimp_param_spec_int32 ("num-strokes",
839
"Number of stroke control points (count each coordinate as 2 points)",
841
GIMP_PARAM_READWRITE));
842
gimp_procedure_add_argument (procedure,
843
gimp_param_spec_float_array ("strokes",
845
"Array of stroke coordinates: { s1.x, s1.y, s2.x, s2.y, ..., sn.x, sn.y }",
846
GIMP_PARAM_READWRITE));
847
gimp_pdb_register_procedure (pdb, procedure);
848
g_object_unref (procedure);
851
* gimp-airbrush-default
853
procedure = gimp_procedure_new (airbrush_default_invoker);
854
gimp_object_set_static_name (GIMP_OBJECT (procedure), "gimp-airbrush-default");
855
gimp_procedure_set_static_strings (procedure,
856
"gimp-airbrush-default",
857
"Paint in the current brush with varying pressure. Paint application is time-dependent.",
858
"This tool simulates the use of an airbrush. It is similar to 'gimp-airbrush' except that the pressure is derived from the airbrush tools options box. It the option has not been set the default for the option will be used.",
863
gimp_procedure_add_argument (procedure,
864
gimp_param_spec_drawable_id ("drawable",
866
"The affected drawable",
868
GIMP_PARAM_READWRITE));
869
gimp_procedure_add_argument (procedure,
870
gimp_param_spec_int32 ("num-strokes",
872
"Number of stroke control points (count each coordinate as 2 points)",
874
GIMP_PARAM_READWRITE));
875
gimp_procedure_add_argument (procedure,
876
gimp_param_spec_float_array ("strokes",
878
"Array of stroke coordinates: { s1.x, s1.y, s2.x, s2.y, ..., sn.x, sn.y }",
879
GIMP_PARAM_READWRITE));
880
gimp_pdb_register_procedure (pdb, procedure);
881
g_object_unref (procedure);
886
procedure = gimp_procedure_new (clone_invoker);
887
gimp_object_set_static_name (GIMP_OBJECT (procedure), "gimp-clone");
888
gimp_procedure_set_static_strings (procedure,
890
"Clone from the source to the dest drawable using the current brush",
891
"This tool clones (copies) from the source drawable starting at the specified source coordinates to the dest drawable. If the \"clone_type\" argument is set to PATTERN-CLONE, then the current pattern is used as the source and the \"src_drawable\" argument is ignored. Pattern cloning assumes a tileable pattern and mods the sum of the src coordinates and subsequent stroke offsets with the width and height of the pattern. For image cloning, if the sum of the src coordinates and subsequent stroke offsets exceeds the extents of the src drawable, then no paint is transferred. The clone tool is capable of transforming between any image types including RGB->Indexed--although converting from any type to indexed is significantly slower.",
892
"Spencer Kimball & Peter Mattis",
893
"Spencer Kimball & Peter Mattis",
896
gimp_procedure_add_argument (procedure,
897
gimp_param_spec_drawable_id ("drawable",
899
"The affected drawable",
901
GIMP_PARAM_READWRITE));
902
gimp_procedure_add_argument (procedure,
903
gimp_param_spec_drawable_id ("src-drawable",
905
"The source drawable",
907
GIMP_PARAM_READWRITE));
908
gimp_procedure_add_argument (procedure,
909
g_param_spec_enum ("clone-type",
912
GIMP_TYPE_CLONE_TYPE,
914
GIMP_PARAM_READWRITE));
915
gimp_procedure_add_argument (procedure,
916
g_param_spec_double ("src-x",
918
"The x coordinate in the source image",
919
-G_MAXDOUBLE, G_MAXDOUBLE, 0,
920
GIMP_PARAM_READWRITE));
921
gimp_procedure_add_argument (procedure,
922
g_param_spec_double ("src-y",
924
"The y coordinate in the source image",
925
-G_MAXDOUBLE, G_MAXDOUBLE, 0,
926
GIMP_PARAM_READWRITE));
927
gimp_procedure_add_argument (procedure,
928
gimp_param_spec_int32 ("num-strokes",
930
"Number of stroke control points (count each coordinate as 2 points)",
932
GIMP_PARAM_READWRITE));
933
gimp_procedure_add_argument (procedure,
934
gimp_param_spec_float_array ("strokes",
936
"Array of stroke coordinates: { s1.x, s1.y, s2.x, s2.y, ..., sn.x, sn.y }",
937
GIMP_PARAM_READWRITE));
938
gimp_pdb_register_procedure (pdb, procedure);
939
g_object_unref (procedure);
944
procedure = gimp_procedure_new (clone_default_invoker);
945
gimp_object_set_static_name (GIMP_OBJECT (procedure), "gimp-clone-default");
946
gimp_procedure_set_static_strings (procedure,
947
"gimp-clone-default",
948
"Clone from the source to the dest drawable using the current brush",
949
"This tool clones (copies) from the source drawable starting at the specified source coordinates to the dest drawable. This function performs exactly the same as the 'gimp-clone' function except that the tools arguments are obtained from the clones option dialog. It this dialog has not been activated then the dialogs default values will be used.",
954
gimp_procedure_add_argument (procedure,
955
gimp_param_spec_drawable_id ("drawable",
957
"The affected drawable",
959
GIMP_PARAM_READWRITE));
960
gimp_procedure_add_argument (procedure,
961
gimp_param_spec_int32 ("num-strokes",
963
"Number of stroke control points (count each coordinate as 2 points)",
965
GIMP_PARAM_READWRITE));
966
gimp_procedure_add_argument (procedure,
967
gimp_param_spec_float_array ("strokes",
969
"Array of stroke coordinates: { s1.x, s1.y, s2.x, s2.y, ..., sn.x, sn.y }",
970
GIMP_PARAM_READWRITE));
971
gimp_pdb_register_procedure (pdb, procedure);
972
g_object_unref (procedure);
977
procedure = gimp_procedure_new (convolve_invoker);
978
gimp_object_set_static_name (GIMP_OBJECT (procedure), "gimp-convolve");
979
gimp_procedure_set_static_strings (procedure,
981
"Convolve (Blur, Sharpen) using the current brush.",
982
"This tool convolves the specified drawable with either a sharpening or blurring kernel. The pressure parameter controls the magnitude of the operation. Like the paintbrush, this tool linearly interpolates between the specified stroke coordinates.",
983
"Spencer Kimball & Peter Mattis",
984
"Spencer Kimball & Peter Mattis",
987
gimp_procedure_add_argument (procedure,
988
gimp_param_spec_drawable_id ("drawable",
990
"The affected drawable",
992
GIMP_PARAM_READWRITE));
993
gimp_procedure_add_argument (procedure,
994
g_param_spec_double ("pressure",
998
GIMP_PARAM_READWRITE));
999
gimp_procedure_add_argument (procedure,
1000
g_param_spec_enum ("convolve-type",
1003
GIMP_TYPE_CONVOLVE_TYPE,
1005
GIMP_PARAM_READWRITE));
1006
gimp_procedure_add_argument (procedure,
1007
gimp_param_spec_int32 ("num-strokes",
1009
"Number of stroke control points (count each coordinate as 2 points)",
1011
GIMP_PARAM_READWRITE));
1012
gimp_procedure_add_argument (procedure,
1013
gimp_param_spec_float_array ("strokes",
1015
"Array of stroke coordinates: { s1.x, s1.y, s2.x, s2.y, ..., sn.x, sn.y }",
1016
GIMP_PARAM_READWRITE));
1017
gimp_pdb_register_procedure (pdb, procedure);
1018
g_object_unref (procedure);
1021
* gimp-convolve-default
1023
procedure = gimp_procedure_new (convolve_default_invoker);
1024
gimp_object_set_static_name (GIMP_OBJECT (procedure), "gimp-convolve-default");
1025
gimp_procedure_set_static_strings (procedure,
1026
"gimp-convolve-default",
1027
"Convolve (Blur, Sharpen) using the current brush.",
1028
"This tool convolves the specified drawable with either a sharpening or blurring kernel. This function performs exactly the same as the 'gimp-convolve' function except that the tools arguments are obtained from the convolve option dialog. It this dialog has not been activated then the dialogs default values will be used.",
1033
gimp_procedure_add_argument (procedure,
1034
gimp_param_spec_drawable_id ("drawable",
1036
"The affected drawable",
1038
GIMP_PARAM_READWRITE));
1039
gimp_procedure_add_argument (procedure,
1040
gimp_param_spec_int32 ("num-strokes",
1042
"Number of stroke control points (count each coordinate as 2 points)",
1044
GIMP_PARAM_READWRITE));
1045
gimp_procedure_add_argument (procedure,
1046
gimp_param_spec_float_array ("strokes",
1048
"Array of stroke coordinates: { s1.x, s1.y, s2.x, s2.y, ..., sn.x, sn.y }",
1049
GIMP_PARAM_READWRITE));
1050
gimp_pdb_register_procedure (pdb, procedure);
1051
g_object_unref (procedure);
1056
procedure = gimp_procedure_new (dodgeburn_invoker);
1057
gimp_object_set_static_name (GIMP_OBJECT (procedure), "gimp-dodgeburn");
1058
gimp_procedure_set_static_strings (procedure,
1060
"Dodgeburn image with varying exposure.",
1061
"Dodgeburn. More details here later.",
1066
gimp_procedure_add_argument (procedure,
1067
gimp_param_spec_drawable_id ("drawable",
1069
"The affected drawable",
1071
GIMP_PARAM_READWRITE));
1072
gimp_procedure_add_argument (procedure,
1073
g_param_spec_double ("exposure",
1075
"The exposure of the strokes",
1077
GIMP_PARAM_READWRITE));
1078
gimp_procedure_add_argument (procedure,
1079
g_param_spec_enum ("dodgeburn-type",
1081
"The type either dodge or burn",
1082
GIMP_TYPE_DODGE_BURN_TYPE,
1084
GIMP_PARAM_READWRITE));
1085
gimp_procedure_add_argument (procedure,
1086
g_param_spec_enum ("dodgeburn-mode",
1089
GIMP_TYPE_TRANSFER_MODE,
1091
GIMP_PARAM_READWRITE));
1092
gimp_procedure_add_argument (procedure,
1093
gimp_param_spec_int32 ("num-strokes",
1095
"Number of stroke control points (count each coordinate as 2 points)",
1097
GIMP_PARAM_READWRITE));
1098
gimp_procedure_add_argument (procedure,
1099
gimp_param_spec_float_array ("strokes",
1101
"Array of stroke coordinates: { s1.x, s1.y, s2.x, s2.y, ..., sn.x, sn.y }",
1102
GIMP_PARAM_READWRITE));
1103
gimp_pdb_register_procedure (pdb, procedure);
1104
g_object_unref (procedure);
1107
* gimp-dodgeburn-default
1109
procedure = gimp_procedure_new (dodgeburn_default_invoker);
1110
gimp_object_set_static_name (GIMP_OBJECT (procedure), "gimp-dodgeburn-default");
1111
gimp_procedure_set_static_strings (procedure,
1112
"gimp-dodgeburn-default",
1113
"Dodgeburn image with varying exposure. This is the same as the gimp_dodgeburn() function except that the exposure, type and mode are taken from the tools option dialog. If the dialog has not been activated then the defaults as used by the dialog will be used.",
1114
"Dodgeburn. More details here later.",
1115
"Spencer Kimball & Peter Mattis",
1116
"Spencer Kimball & Peter Mattis",
1119
gimp_procedure_add_argument (procedure,
1120
gimp_param_spec_drawable_id ("drawable",
1122
"The affected drawable",
1124
GIMP_PARAM_READWRITE));
1125
gimp_procedure_add_argument (procedure,
1126
gimp_param_spec_int32 ("num-strokes",
1128
"Number of stroke control points (count each coordinate as 2 points)",
1130
GIMP_PARAM_READWRITE));
1131
gimp_procedure_add_argument (procedure,
1132
gimp_param_spec_float_array ("strokes",
1134
"Array of stroke coordinates: { s1.x, s1.y, s2.x, s2.y, ..., sn.x, sn.y }",
1135
GIMP_PARAM_READWRITE));
1136
gimp_pdb_register_procedure (pdb, procedure);
1137
g_object_unref (procedure);
1142
procedure = gimp_procedure_new (eraser_invoker);
1143
gimp_object_set_static_name (GIMP_OBJECT (procedure), "gimp-eraser");
1144
gimp_procedure_set_static_strings (procedure,
1146
"Erase using the current brush.",
1147
"This tool erases using the current brush mask. If the specified drawable contains an alpha channel, then the erased pixels will become transparent. Otherwise, the eraser tool replaces the contents of the drawable with the background color. Like paintbrush, this tool linearly interpolates between the specified stroke coordinates.",
1148
"Spencer Kimball & Peter Mattis",
1149
"Spencer Kimball & Peter Mattis",
1152
gimp_procedure_add_argument (procedure,
1153
gimp_param_spec_drawable_id ("drawable",
1155
"The affected drawable",
1157
GIMP_PARAM_READWRITE));
1158
gimp_procedure_add_argument (procedure,
1159
gimp_param_spec_int32 ("num-strokes",
1161
"Number of stroke control points (count each coordinate as 2 points)",
1163
GIMP_PARAM_READWRITE));
1164
gimp_procedure_add_argument (procedure,
1165
gimp_param_spec_float_array ("strokes",
1167
"Array of stroke coordinates: { s1.x, s1.y, s2.x, s2.y, ..., sn.x, sn.y }",
1168
GIMP_PARAM_READWRITE));
1169
gimp_procedure_add_argument (procedure,
1170
g_param_spec_enum ("hardness",
1172
"How to apply the brush",
1173
GIMP_TYPE_BRUSH_APPLICATION_MODE,
1175
GIMP_PARAM_READWRITE));
1176
gimp_procedure_add_argument (procedure,
1177
g_param_spec_enum ("method",
1179
"The paint method to use",
1180
GIMP_TYPE_PAINT_APPLICATION_MODE,
1181
GIMP_PAINT_CONSTANT,
1182
GIMP_PARAM_READWRITE));
1183
gimp_pdb_register_procedure (pdb, procedure);
1184
g_object_unref (procedure);
1187
* gimp-eraser-default
1189
procedure = gimp_procedure_new (eraser_default_invoker);
1190
gimp_object_set_static_name (GIMP_OBJECT (procedure), "gimp-eraser-default");
1191
gimp_procedure_set_static_strings (procedure,
1192
"gimp-eraser-default",
1193
"Erase using the current brush.",
1194
"This tool erases using the current brush mask. This function performs exactly the same as the 'gimp-eraser' function except that the tools arguments are obtained from the eraser option dialog. It this dialog has not been activated then the dialogs default values will be used.",
1199
gimp_procedure_add_argument (procedure,
1200
gimp_param_spec_drawable_id ("drawable",
1202
"The affected drawable",
1204
GIMP_PARAM_READWRITE));
1205
gimp_procedure_add_argument (procedure,
1206
gimp_param_spec_int32 ("num-strokes",
1208
"Number of stroke control points (count each coordinate as 2 points)",
1210
GIMP_PARAM_READWRITE));
1211
gimp_procedure_add_argument (procedure,
1212
gimp_param_spec_float_array ("strokes",
1214
"Array of stroke coordinates: { s1.x, s1.y, s2.x, s2.y, ..., sn.x, sn.y }",
1215
GIMP_PARAM_READWRITE));
1216
gimp_pdb_register_procedure (pdb, procedure);
1217
g_object_unref (procedure);
1222
procedure = gimp_procedure_new (heal_invoker);
1223
gimp_object_set_static_name (GIMP_OBJECT (procedure), "gimp-heal");
1224
gimp_procedure_set_static_strings (procedure,
1226
"Heal from the source to the dest drawable using the current brush",
1227
"This tool heals the source drawable starting at the specified source coordinates to the dest drawable. For image healing, if the sum of the src coordinates and subsequent stroke offsets exceeds the extents of the src drawable, then no paint is transferred. The healing tool is capable of transforming between any image types except RGB->Indexed.",
1232
gimp_procedure_add_argument (procedure,
1233
gimp_param_spec_drawable_id ("drawable",
1235
"The affected drawable",
1237
GIMP_PARAM_READWRITE));
1238
gimp_procedure_add_argument (procedure,
1239
gimp_param_spec_drawable_id ("src-drawable",
1241
"The source drawable",
1243
GIMP_PARAM_READWRITE));
1244
gimp_procedure_add_argument (procedure,
1245
g_param_spec_double ("src-x",
1247
"The x coordinate in the source image",
1248
-G_MAXDOUBLE, G_MAXDOUBLE, 0,
1249
GIMP_PARAM_READWRITE));
1250
gimp_procedure_add_argument (procedure,
1251
g_param_spec_double ("src-y",
1253
"The y coordinate in the source image",
1254
-G_MAXDOUBLE, G_MAXDOUBLE, 0,
1255
GIMP_PARAM_READWRITE));
1256
gimp_procedure_add_argument (procedure,
1257
gimp_param_spec_int32 ("num-strokes",
1259
"Number of stroke control points (count each coordinate as 2 points)",
1261
GIMP_PARAM_READWRITE));
1262
gimp_procedure_add_argument (procedure,
1263
gimp_param_spec_float_array ("strokes",
1265
"Array of stroke coordinates: { s1.x, s1.y, s2.x, s2.y, ..., sn.x, sn.y }",
1266
GIMP_PARAM_READWRITE));
1267
gimp_pdb_register_procedure (pdb, procedure);
1268
g_object_unref (procedure);
1273
procedure = gimp_procedure_new (heal_default_invoker);
1274
gimp_object_set_static_name (GIMP_OBJECT (procedure), "gimp-heal-default");
1275
gimp_procedure_set_static_strings (procedure,
1276
"gimp-heal-default",
1277
"Heal from the source to the dest drawable using the current brush",
1278
"This tool heals from the source drawable starting at the specified source coordinates to the dest drawable. This function performs exactly the same as the 'gimp-heal' function except that the tools arguments are obtained from the healing option dialog. It this dialog has not been activated then the dialogs default values will be used.",
1283
gimp_procedure_add_argument (procedure,
1284
gimp_param_spec_drawable_id ("drawable",
1286
"The affected drawable",
1288
GIMP_PARAM_READWRITE));
1289
gimp_procedure_add_argument (procedure,
1290
gimp_param_spec_int32 ("num-strokes",
1292
"Number of stroke control points (count each coordinate as 2 points)",
1294
GIMP_PARAM_READWRITE));
1295
gimp_procedure_add_argument (procedure,
1296
gimp_param_spec_float_array ("strokes",
1298
"Array of stroke coordinates: { s1.x, s1.y, s2.x, s2.y, ..., sn.x, sn.y }",
1299
GIMP_PARAM_READWRITE));
1300
gimp_pdb_register_procedure (pdb, procedure);
1301
g_object_unref (procedure);
1306
procedure = gimp_procedure_new (paintbrush_invoker);
1307
gimp_object_set_static_name (GIMP_OBJECT (procedure), "gimp-paintbrush");
1308
gimp_procedure_set_static_strings (procedure,
1310
"Paint in the current brush with optional fade out parameter and pull colors from a gradient.",
1311
"This tool is the standard paintbrush. It draws linearly interpolated lines through the specified stroke coordinates. It operates on the specified drawable in the foreground color with the active brush. The 'fade-out' parameter is measured in pixels and allows the brush stroke to linearly fall off. The pressure is set to the maximum at the beginning of the stroke. As the distance of the stroke nears the fade-out value, the pressure will approach zero. The gradient-length is the distance to spread the gradient over. It is measured in pixels. If the gradient-length is 0, no gradient is used.",
1312
"Spencer Kimball & Peter Mattis",
1313
"Spencer Kimball & Peter Mattis",
1316
gimp_procedure_add_argument (procedure,
1317
gimp_param_spec_drawable_id ("drawable",
1319
"The affected drawable",
1321
GIMP_PARAM_READWRITE));
1322
gimp_procedure_add_argument (procedure,
1323
g_param_spec_double ("fade-out",
1325
"Fade out parameter",
1327
GIMP_PARAM_READWRITE));
1328
gimp_procedure_add_argument (procedure,
1329
gimp_param_spec_int32 ("num-strokes",
1331
"Number of stroke control points (count each coordinate as 2 points)",
1333
GIMP_PARAM_READWRITE));
1334
gimp_procedure_add_argument (procedure,
1335
gimp_param_spec_float_array ("strokes",
1337
"Array of stroke coordinates: { s1.x, s1.y, s2.x, s2.y, ..., sn.x, sn.y }",
1338
GIMP_PARAM_READWRITE));
1339
gimp_procedure_add_argument (procedure,
1340
g_param_spec_enum ("method",
1342
"The paint method to use",
1343
GIMP_TYPE_PAINT_APPLICATION_MODE,
1344
GIMP_PAINT_CONSTANT,
1345
GIMP_PARAM_READWRITE));
1346
gimp_procedure_add_argument (procedure,
1347
g_param_spec_double ("gradient-length",
1349
"Length of gradient to draw",
1351
GIMP_PARAM_READWRITE));
1352
gimp_pdb_register_procedure (pdb, procedure);
1353
g_object_unref (procedure);
1356
* gimp-paintbrush-default
1358
procedure = gimp_procedure_new (paintbrush_default_invoker);
1359
gimp_object_set_static_name (GIMP_OBJECT (procedure), "gimp-paintbrush-default");
1360
gimp_procedure_set_static_strings (procedure,
1361
"gimp-paintbrush-default",
1362
"Paint in the current brush. The fade out parameter and pull colors from a gradient parameter are set from the paintbrush options dialog. If this dialog has not been activated then the dialog defaults will be used.",
1363
"This tool is similar to the standard paintbrush. It draws linearly interpolated lines through the specified stroke coordinates. It operates on the specified drawable in the foreground color with the active brush. The 'fade-out' parameter is measured in pixels and allows the brush stroke to linearly fall off (value obtained from the option dialog). The pressure is set to the maximum at the beginning of the stroke. As the distance of the stroke nears the fade-out value, the pressure will approach zero. The gradient-length (value obtained from the option dialog) is the distance to spread the gradient over. It is measured in pixels. If the gradient-length is 0, no gradient is used.",
1368
gimp_procedure_add_argument (procedure,
1369
gimp_param_spec_drawable_id ("drawable",
1371
"The affected drawable",
1373
GIMP_PARAM_READWRITE));
1374
gimp_procedure_add_argument (procedure,
1375
gimp_param_spec_int32 ("num-strokes",
1377
"Number of stroke control points (count each coordinate as 2 points)",
1379
GIMP_PARAM_READWRITE));
1380
gimp_procedure_add_argument (procedure,
1381
gimp_param_spec_float_array ("strokes",
1383
"Array of stroke coordinates: { s1.x, s1.y, s2.x, s2.y, ..., sn.x, sn.y }",
1384
GIMP_PARAM_READWRITE));
1385
gimp_pdb_register_procedure (pdb, procedure);
1386
g_object_unref (procedure);
1391
procedure = gimp_procedure_new (pencil_invoker);
1392
gimp_object_set_static_name (GIMP_OBJECT (procedure), "gimp-pencil");
1393
gimp_procedure_set_static_strings (procedure,
1395
"Paint in the current brush without sub-pixel sampling.",
1396
"This tool is the standard pencil. It draws linearly interpolated lines through the specified stroke coordinates. It operates on the specified drawable in the foreground color with the active brush. The brush mask is treated as though it contains only black and white values. Any value below half is treated as black; any above half, as white.",
1397
"Spencer Kimball & Peter Mattis",
1398
"Spencer Kimball & Peter Mattis",
1401
gimp_procedure_add_argument (procedure,
1402
gimp_param_spec_drawable_id ("drawable",
1404
"The affected drawable",
1406
GIMP_PARAM_READWRITE));
1407
gimp_procedure_add_argument (procedure,
1408
gimp_param_spec_int32 ("num-strokes",
1410
"Number of stroke control points (count each coordinate as 2 points)",
1412
GIMP_PARAM_READWRITE));
1413
gimp_procedure_add_argument (procedure,
1414
gimp_param_spec_float_array ("strokes",
1416
"Array of stroke coordinates: { s1.x, s1.y, s2.x, s2.y, ..., sn.x, sn.y }",
1417
GIMP_PARAM_READWRITE));
1418
gimp_pdb_register_procedure (pdb, procedure);
1419
g_object_unref (procedure);
1424
procedure = gimp_procedure_new (smudge_invoker);
1425
gimp_object_set_static_name (GIMP_OBJECT (procedure), "gimp-smudge");
1426
gimp_procedure_set_static_strings (procedure,
1428
"Smudge image with varying pressure.",
1429
"This tool simulates a smudge using the current brush. High pressure results in a greater smudge of paint while low pressure results in a lesser smudge.",
1430
"Spencer Kimball & Peter Mattis",
1431
"Spencer Kimball & Peter Mattis",
1434
gimp_procedure_add_argument (procedure,
1435
gimp_param_spec_drawable_id ("drawable",
1437
"The affected drawable",
1439
GIMP_PARAM_READWRITE));
1440
gimp_procedure_add_argument (procedure,
1441
g_param_spec_double ("pressure",
1443
"The pressure of the smudge strokes",
1445
GIMP_PARAM_READWRITE));
1446
gimp_procedure_add_argument (procedure,
1447
gimp_param_spec_int32 ("num-strokes",
1449
"Number of stroke control points (count each coordinate as 2 points)",
1451
GIMP_PARAM_READWRITE));
1452
gimp_procedure_add_argument (procedure,
1453
gimp_param_spec_float_array ("strokes",
1455
"Array of stroke coordinates: { s1.x, s1.y, s2.x, s2.y, ..., sn.x, sn.y }",
1456
GIMP_PARAM_READWRITE));
1457
gimp_pdb_register_procedure (pdb, procedure);
1458
g_object_unref (procedure);
1461
* gimp-smudge-default
1463
procedure = gimp_procedure_new (smudge_default_invoker);
1464
gimp_object_set_static_name (GIMP_OBJECT (procedure), "gimp-smudge-default");
1465
gimp_procedure_set_static_strings (procedure,
1466
"gimp-smudge-default",
1467
"Smudge image with varying pressure.",
1468
"This tool simulates a smudge using the current brush. It behaves exactly the same as 'gimp-smudge' except that the pressure value is taken from the smudge tool options or the options default if the tools option dialog has not been activated.",
1473
gimp_procedure_add_argument (procedure,
1474
gimp_param_spec_drawable_id ("drawable",
1476
"The affected drawable",
1478
GIMP_PARAM_READWRITE));
1479
gimp_procedure_add_argument (procedure,
1480
gimp_param_spec_int32 ("num-strokes",
1482
"Number of stroke control points (count each coordinate as 2 points)",
1484
GIMP_PARAM_READWRITE));
1485
gimp_procedure_add_argument (procedure,
1486
gimp_param_spec_float_array ("strokes",
1488
"Array of stroke coordinates: { s1.x, s1.y, s2.x, s2.y, ..., sn.x, sn.y }",
1489
GIMP_PARAM_READWRITE));
1490
gimp_pdb_register_procedure (pdb, procedure);
1491
g_object_unref (procedure);