1
<?xml version="1.0" encoding="UTF-8" ?>
2
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
3
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
5
<refentry id="libgimp-gimptools">
7
<refentrytitle role="top_of_page" id="libgimp-gimptools.top_of_page">gimptools</refentrytitle>
8
<manvolnum>3</manvolnum>
9
<refmiscinfo>LIBGIMP Library</refmiscinfo>
13
<refname>gimptools</refname>
14
<refpurpose>Access to common toolbox tools.</refpurpose>
17
<refsynopsisdiv id="libgimp-gimptools.synopsis" role="synopsis">
18
<title role="synopsis.title">Synopsis</title>
21
<link linkend="gboolean">gboolean</link> <link linkend="gimp-airbrush">gimp_airbrush</link> (<link linkend="gint32">gint32</link> drawable_ID,
22
<link linkend="gdouble">gdouble</link> pressure,
23
<link linkend="gint">gint</link> num_strokes,
24
const <link linkend="gdouble">gdouble</link> *strokes);
25
<link linkend="gboolean">gboolean</link> <link linkend="gimp-airbrush-default">gimp_airbrush_default</link> (<link linkend="gint32">gint32</link> drawable_ID,
26
<link linkend="gint">gint</link> num_strokes,
27
const <link linkend="gdouble">gdouble</link> *strokes);
28
<link linkend="gboolean">gboolean</link> <link linkend="gimp-by-color-select">gimp_by_color_select</link> (<link linkend="gint32">gint32</link> drawable_ID,
29
const <link linkend="GimpRGB">GimpRGB</link> *color,
30
<link linkend="gint">gint</link> threshold,
31
<link linkend="GimpChannelOps">GimpChannelOps</link> operation,
32
<link linkend="gboolean">gboolean</link> antialias,
33
<link linkend="gboolean">gboolean</link> feather,
34
<link linkend="gdouble">gdouble</link> feather_radius,
35
<link linkend="gboolean">gboolean</link> sample_merged);
36
<link linkend="gboolean">gboolean</link> <link linkend="gimp-by-color-select-full">gimp_by_color_select_full</link> (<link linkend="gint32">gint32</link> drawable_ID,
37
const <link linkend="GimpRGB">GimpRGB</link> *color,
38
<link linkend="gint">gint</link> threshold,
39
<link linkend="GimpChannelOps">GimpChannelOps</link> operation,
40
<link linkend="gboolean">gboolean</link> antialias,
41
<link linkend="gboolean">gboolean</link> feather,
42
<link linkend="gdouble">gdouble</link> feather_radius_x,
43
<link linkend="gdouble">gdouble</link> feather_radius_y,
44
<link linkend="gboolean">gboolean</link> sample_merged,
45
<link linkend="gboolean">gboolean</link> select_transparent,
46
<link linkend="GimpSelectCriterion">GimpSelectCriterion</link> select_criterion);
47
<link linkend="gboolean">gboolean</link> <link linkend="gimp-clone">gimp_clone</link> (<link linkend="gint32">gint32</link> drawable_ID,
48
<link linkend="gint32">gint32</link> src_drawable_ID,
49
<link linkend="GimpCloneType">GimpCloneType</link> clone_type,
50
<link linkend="gdouble">gdouble</link> src_x,
51
<link linkend="gdouble">gdouble</link> src_y,
52
<link linkend="gint">gint</link> num_strokes,
53
const <link linkend="gdouble">gdouble</link> *strokes);
54
<link linkend="gboolean">gboolean</link> <link linkend="gimp-clone-default">gimp_clone_default</link> (<link linkend="gint32">gint32</link> drawable_ID,
55
<link linkend="gint">gint</link> num_strokes,
56
const <link linkend="gdouble">gdouble</link> *strokes);
57
<link linkend="gboolean">gboolean</link> <link linkend="gimp-convolve">gimp_convolve</link> (<link linkend="gint32">gint32</link> drawable_ID,
58
<link linkend="gdouble">gdouble</link> pressure,
59
<link linkend="GimpConvolveType">GimpConvolveType</link> convolve_type,
60
<link linkend="gint">gint</link> num_strokes,
61
const <link linkend="gdouble">gdouble</link> *strokes);
62
<link linkend="gboolean">gboolean</link> <link linkend="gimp-convolve-default">gimp_convolve_default</link> (<link linkend="gint32">gint32</link> drawable_ID,
63
<link linkend="gint">gint</link> num_strokes,
64
const <link linkend="gdouble">gdouble</link> *strokes);
65
<link linkend="gboolean">gboolean</link> <link linkend="gimp-dodgeburn">gimp_dodgeburn</link> (<link linkend="gint32">gint32</link> drawable_ID,
66
<link linkend="gdouble">gdouble</link> exposure,
67
<link linkend="GimpDodgeBurnType">GimpDodgeBurnType</link> dodgeburn_type,
68
<link linkend="GimpTransferMode">GimpTransferMode</link> dodgeburn_mode,
69
<link linkend="gint">gint</link> num_strokes,
70
const <link linkend="gdouble">gdouble</link> *strokes);
71
<link linkend="gboolean">gboolean</link> <link linkend="gimp-dodgeburn-default">gimp_dodgeburn_default</link> (<link linkend="gint32">gint32</link> drawable_ID,
72
<link linkend="gint">gint</link> num_strokes,
73
const <link linkend="gdouble">gdouble</link> *strokes);
74
<link linkend="gboolean">gboolean</link> <link linkend="gimp-edit-bucket-fill-full">gimp_edit_bucket_fill_full</link> (<link linkend="gint32">gint32</link> drawable_ID,
75
<link linkend="GimpBucketFillMode">GimpBucketFillMode</link> fill_mode,
76
<link linkend="GimpLayerModeEffects">GimpLayerModeEffects</link> paint_mode,
77
<link linkend="gdouble">gdouble</link> opacity,
78
<link linkend="gdouble">gdouble</link> threshold,
79
<link linkend="gboolean">gboolean</link> sample_merged,
80
<link linkend="gboolean">gboolean</link> fill_transparent,
81
<link linkend="GimpSelectCriterion">GimpSelectCriterion</link> select_criterion,
82
<link linkend="gdouble">gdouble</link> x,
83
<link linkend="gdouble">gdouble</link> y);
84
<link linkend="gboolean">gboolean</link> <link linkend="gimp-ellipse-select">gimp_ellipse_select</link> (<link linkend="gint32">gint32</link> image_ID,
85
<link linkend="gdouble">gdouble</link> x,
86
<link linkend="gdouble">gdouble</link> y,
87
<link linkend="gdouble">gdouble</link> width,
88
<link linkend="gdouble">gdouble</link> height,
89
<link linkend="GimpChannelOps">GimpChannelOps</link> operation,
90
<link linkend="gboolean">gboolean</link> antialias,
91
<link linkend="gboolean">gboolean</link> feather,
92
<link linkend="gdouble">gdouble</link> feather_radius);
93
<link linkend="gboolean">gboolean</link> <link linkend="gimp-eraser">gimp_eraser</link> (<link linkend="gint32">gint32</link> drawable_ID,
94
<link linkend="gint">gint</link> num_strokes,
95
const <link linkend="gdouble">gdouble</link> *strokes,
96
<link linkend="GimpBrushApplicationMode">GimpBrushApplicationMode</link> hardness,
97
<link linkend="GimpPaintApplicationMode">GimpPaintApplicationMode</link> method);
98
<link linkend="gboolean">gboolean</link> <link linkend="gimp-eraser-default">gimp_eraser_default</link> (<link linkend="gint32">gint32</link> drawable_ID,
99
<link linkend="gint">gint</link> num_strokes,
100
const <link linkend="gdouble">gdouble</link> *strokes);
101
<link linkend="gint32">gint32</link> <link linkend="gimp-flip">gimp_flip</link> (<link linkend="gint32">gint32</link> drawable_ID,
102
<link linkend="GimpOrientationType">GimpOrientationType</link> flip_type);
103
<link linkend="gboolean">gboolean</link> <link linkend="gimp-free-select">gimp_free_select</link> (<link linkend="gint32">gint32</link> image_ID,
104
<link linkend="gint">gint</link> num_segs,
105
const <link linkend="gdouble">gdouble</link> *segs,
106
<link linkend="GimpChannelOps">GimpChannelOps</link> operation,
107
<link linkend="gboolean">gboolean</link> antialias,
108
<link linkend="gboolean">gboolean</link> feather,
109
<link linkend="gdouble">gdouble</link> feather_radius);
110
<link linkend="gboolean">gboolean</link> <link linkend="gimp-fuzzy-select">gimp_fuzzy_select</link> (<link linkend="gint32">gint32</link> drawable_ID,
111
<link linkend="gdouble">gdouble</link> x,
112
<link linkend="gdouble">gdouble</link> y,
113
<link linkend="gint">gint</link> threshold,
114
<link linkend="GimpChannelOps">GimpChannelOps</link> operation,
115
<link linkend="gboolean">gboolean</link> antialias,
116
<link linkend="gboolean">gboolean</link> feather,
117
<link linkend="gdouble">gdouble</link> feather_radius,
118
<link linkend="gboolean">gboolean</link> sample_merged);
119
<link linkend="gboolean">gboolean</link> <link linkend="gimp-fuzzy-select-full">gimp_fuzzy_select_full</link> (<link linkend="gint32">gint32</link> drawable_ID,
120
<link linkend="gdouble">gdouble</link> x,
121
<link linkend="gdouble">gdouble</link> y,
122
<link linkend="gint">gint</link> threshold,
123
<link linkend="GimpChannelOps">GimpChannelOps</link> operation,
124
<link linkend="gboolean">gboolean</link> antialias,
125
<link linkend="gboolean">gboolean</link> feather,
126
<link linkend="gdouble">gdouble</link> feather_radius_x,
127
<link linkend="gdouble">gdouble</link> feather_radius_y,
128
<link linkend="gboolean">gboolean</link> sample_merged,
129
<link linkend="gboolean">gboolean</link> select_transparent,
130
<link linkend="GimpSelectCriterion">GimpSelectCriterion</link> select_criterion);
131
<link linkend="gboolean">gboolean</link> <link linkend="gimp-heal">gimp_heal</link> (<link linkend="gint32">gint32</link> drawable_ID,
132
<link linkend="gint32">gint32</link> src_drawable_ID,
133
<link linkend="gdouble">gdouble</link> src_x,
134
<link linkend="gdouble">gdouble</link> src_y,
135
<link linkend="gint">gint</link> num_strokes,
136
const <link linkend="gdouble">gdouble</link> *strokes);
137
<link linkend="gboolean">gboolean</link> <link linkend="gimp-heal-default">gimp_heal_default</link> (<link linkend="gint32">gint32</link> drawable_ID,
138
<link linkend="gint">gint</link> num_strokes,
139
const <link linkend="gdouble">gdouble</link> *strokes);
140
<link linkend="gboolean">gboolean</link> <link linkend="gimp-paintbrush">gimp_paintbrush</link> (<link linkend="gint32">gint32</link> drawable_ID,
141
<link linkend="gdouble">gdouble</link> fade_out,
142
<link linkend="gint">gint</link> num_strokes,
143
const <link linkend="gdouble">gdouble</link> *strokes,
144
<link linkend="GimpPaintApplicationMode">GimpPaintApplicationMode</link> method,
145
<link linkend="gdouble">gdouble</link> gradient_length);
146
<link linkend="gboolean">gboolean</link> <link linkend="gimp-paintbrush-default">gimp_paintbrush_default</link> (<link linkend="gint32">gint32</link> drawable_ID,
147
<link linkend="gint">gint</link> num_strokes,
148
const <link linkend="gdouble">gdouble</link> *strokes);
149
<link linkend="gboolean">gboolean</link> <link linkend="gimp-pencil">gimp_pencil</link> (<link linkend="gint32">gint32</link> drawable_ID,
150
<link linkend="gint">gint</link> num_strokes,
151
const <link linkend="gdouble">gdouble</link> *strokes);
152
<link linkend="gint32">gint32</link> <link linkend="gimp-perspective">gimp_perspective</link> (<link linkend="gint32">gint32</link> drawable_ID,
153
<link linkend="gboolean">gboolean</link> interpolation,
154
<link linkend="gdouble">gdouble</link> x0,
155
<link linkend="gdouble">gdouble</link> y0,
156
<link linkend="gdouble">gdouble</link> x1,
157
<link linkend="gdouble">gdouble</link> y1,
158
<link linkend="gdouble">gdouble</link> x2,
159
<link linkend="gdouble">gdouble</link> y2,
160
<link linkend="gdouble">gdouble</link> x3,
161
<link linkend="gdouble">gdouble</link> y3);
162
<link linkend="gboolean">gboolean</link> <link linkend="gimp-rect-select">gimp_rect_select</link> (<link linkend="gint32">gint32</link> image_ID,
163
<link linkend="gdouble">gdouble</link> x,
164
<link linkend="gdouble">gdouble</link> y,
165
<link linkend="gdouble">gdouble</link> width,
166
<link linkend="gdouble">gdouble</link> height,
167
<link linkend="GimpChannelOps">GimpChannelOps</link> operation,
168
<link linkend="gboolean">gboolean</link> feather,
169
<link linkend="gdouble">gdouble</link> feather_radius);
170
<link linkend="gboolean">gboolean</link> <link linkend="gimp-round-rect-select">gimp_round_rect_select</link> (<link linkend="gint32">gint32</link> image_ID,
171
<link linkend="gdouble">gdouble</link> x,
172
<link linkend="gdouble">gdouble</link> y,
173
<link linkend="gdouble">gdouble</link> width,
174
<link linkend="gdouble">gdouble</link> height,
175
<link linkend="gdouble">gdouble</link> corner_radius_x,
176
<link linkend="gdouble">gdouble</link> corner_radius_y,
177
<link linkend="GimpChannelOps">GimpChannelOps</link> operation,
178
<link linkend="gboolean">gboolean</link> antialias,
179
<link linkend="gboolean">gboolean</link> feather,
180
<link linkend="gdouble">gdouble</link> feather_radius_x,
181
<link linkend="gdouble">gdouble</link> feather_radius_y);
182
<link linkend="gint32">gint32</link> <link linkend="gimp-rotate">gimp_rotate</link> (<link linkend="gint32">gint32</link> drawable_ID,
183
<link linkend="gboolean">gboolean</link> interpolation,
184
<link linkend="gdouble">gdouble</link> angle);
185
<link linkend="gint32">gint32</link> <link linkend="gimp-scale">gimp_scale</link> (<link linkend="gint32">gint32</link> drawable_ID,
186
<link linkend="gboolean">gboolean</link> interpolation,
187
<link linkend="gdouble">gdouble</link> x0,
188
<link linkend="gdouble">gdouble</link> y0,
189
<link linkend="gdouble">gdouble</link> x1,
190
<link linkend="gdouble">gdouble</link> y1);
191
<link linkend="gint32">gint32</link> <link linkend="gimp-shear">gimp_shear</link> (<link linkend="gint32">gint32</link> drawable_ID,
192
<link linkend="gboolean">gboolean</link> interpolation,
193
<link linkend="GimpOrientationType">GimpOrientationType</link> shear_type,
194
<link linkend="gdouble">gdouble</link> magnitude);
195
<link linkend="gboolean">gboolean</link> <link linkend="gimp-smudge">gimp_smudge</link> (<link linkend="gint32">gint32</link> drawable_ID,
196
<link linkend="gdouble">gdouble</link> pressure,
197
<link linkend="gint">gint</link> num_strokes,
198
const <link linkend="gdouble">gdouble</link> *strokes);
199
<link linkend="gboolean">gboolean</link> <link linkend="gimp-smudge-default">gimp_smudge_default</link> (<link linkend="gint32">gint32</link> drawable_ID,
200
<link linkend="gint">gint</link> num_strokes,
201
const <link linkend="gdouble">gdouble</link> *strokes);
202
<link linkend="gint32">gint32</link> <link linkend="gimp-transform-2d">gimp_transform_2d</link> (<link linkend="gint32">gint32</link> drawable_ID,
203
<link linkend="gboolean">gboolean</link> interpolation,
204
<link linkend="gdouble">gdouble</link> source_x,
205
<link linkend="gdouble">gdouble</link> source_y,
206
<link linkend="gdouble">gdouble</link> scale_x,
207
<link linkend="gdouble">gdouble</link> scale_y,
208
<link linkend="gdouble">gdouble</link> angle,
209
<link linkend="gdouble">gdouble</link> dest_x,
210
<link linkend="gdouble">gdouble</link> dest_y);
222
<refsect1 id="libgimp-gimptools.description" role="desc">
223
<title role="desc.title">Description</title>
225
Functions giving access to common toolbox tools.
229
<refsect1 id="libgimp-gimptools.details" role="details">
230
<title role="details.title">Details</title>
231
<refsect2 id="gimp-airbrush" role="function">
232
<title>gimp_airbrush ()</title>
233
<indexterm zone="gimp-airbrush"><primary sortas="gimp_airbrush">gimp_airbrush</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_airbrush (<link linkend="gint32">gint32</link> drawable_ID,
234
<link linkend="gdouble">gdouble</link> pressure,
235
<link linkend="gint">gint</link> num_strokes,
236
const <link linkend="gdouble">gdouble</link> *strokes);</programlisting>
238
Paint in the current brush with varying pressure. Paint application
242
This tool simulates the use of an airbrush. Paint pressure
243
represents the relative intensity of the paint application. High
244
pressure results in a thicker layer of paint while low pressure
245
results in a thinner layer.</para>
247
</para><variablelist role="params">
248
<varlistentry><term><parameter>drawable_ID</parameter> :</term>
249
<listitem><simpara> The affected drawable.
250
</simpara></listitem></varlistentry>
251
<varlistentry><term><parameter>pressure</parameter> :</term>
252
<listitem><simpara> The pressure of the airbrush strokes.
253
</simpara></listitem></varlistentry>
254
<varlistentry><term><parameter>num_strokes</parameter> :</term>
255
<listitem><simpara> Number of stroke control points (count each coordinate as 2 points).
256
</simpara></listitem></varlistentry>
257
<varlistentry><term><parameter>strokes</parameter> :</term>
258
<listitem><simpara> Array of stroke coordinates: { s1.x, s1.y, s2.x, s2.y, ..., sn.x, sn.y }.
259
</simpara></listitem></varlistentry>
260
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> TRUE on success.
261
</simpara></listitem></varlistentry>
262
</variablelist></refsect2>
263
<refsect2 id="gimp-airbrush-default" role="function">
264
<title>gimp_airbrush_default ()</title>
265
<indexterm zone="gimp-airbrush-default"><primary sortas="gimp_airbrush_default">gimp_airbrush_default</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_airbrush_default (<link linkend="gint32">gint32</link> drawable_ID,
266
<link linkend="gint">gint</link> num_strokes,
267
const <link linkend="gdouble">gdouble</link> *strokes);</programlisting>
269
Paint in the current brush with varying pressure. Paint application
273
This tool simulates the use of an airbrush. It is similar to
274
<link linkend="gimp-airbrush"><function>gimp_airbrush()</function></link> except that the pressure is derived from the
275
airbrush tools options box. It the option has not been set the
276
default for the option will be used.</para>
278
</para><variablelist role="params">
279
<varlistentry><term><parameter>drawable_ID</parameter> :</term>
280
<listitem><simpara> The affected drawable.
281
</simpara></listitem></varlistentry>
282
<varlistentry><term><parameter>num_strokes</parameter> :</term>
283
<listitem><simpara> Number of stroke control points (count each coordinate as 2 points).
284
</simpara></listitem></varlistentry>
285
<varlistentry><term><parameter>strokes</parameter> :</term>
286
<listitem><simpara> Array of stroke coordinates: { s1.x, s1.y, s2.x, s2.y, ..., sn.x, sn.y }.
287
</simpara></listitem></varlistentry>
288
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> TRUE on success.
289
</simpara></listitem></varlistentry>
290
</variablelist></refsect2>
291
<refsect2 id="gimp-by-color-select" role="function">
292
<title>gimp_by_color_select ()</title>
293
<indexterm zone="gimp-by-color-select"><primary sortas="gimp_by_color_select">gimp_by_color_select</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_by_color_select (<link linkend="gint32">gint32</link> drawable_ID,
294
const <link linkend="GimpRGB">GimpRGB</link> *color,
295
<link linkend="gint">gint</link> threshold,
296
<link linkend="GimpChannelOps">GimpChannelOps</link> operation,
297
<link linkend="gboolean">gboolean</link> antialias,
298
<link linkend="gboolean">gboolean</link> feather,
299
<link linkend="gdouble">gdouble</link> feather_radius,
300
<link linkend="gboolean">gboolean</link> sample_merged);</programlisting>
302
Create a selection by selecting all pixels (in the specified
303
drawable) with the same (or similar) color to that specified.
306
This tool creates a selection over the specified image. A by-color
307
selection is determined by the supplied color under the constraints
308
of the specified threshold. Essentially, all pixels (in the
309
drawable) that have color sufficiently close to the specified color
310
(as determined by the threshold value) are included in the
311
selection. The antialiasing parameter allows the final selection
312
mask to contain intermediate values based on close misses to the
313
threshold bar. Feathering can be enabled optionally and is
314
controlled with the 'feather-radius' parameter. If the
315
'sample-merged' parameter is TRUE, the data of the composite image
316
will be used instead of that for the specified drawable. This is
317
equivalent to sampling for colors after merging all visible layers.
318
In the case of a merged sampling, the supplied drawable is ignored.</para>
320
</para><variablelist role="params">
321
<varlistentry><term><parameter>drawable_ID</parameter> :</term>
322
<listitem><simpara> The affected drawable.
323
</simpara></listitem></varlistentry>
324
<varlistentry><term><parameter>color</parameter> :</term>
325
<listitem><simpara> The color to select.
326
</simpara></listitem></varlistentry>
327
<varlistentry><term><parameter>threshold</parameter> :</term>
328
<listitem><simpara> Threshold in intensity levels.
329
</simpara></listitem></varlistentry>
330
<varlistentry><term><parameter>operation</parameter> :</term>
331
<listitem><simpara> The selection operation.
332
</simpara></listitem></varlistentry>
333
<varlistentry><term><parameter>antialias</parameter> :</term>
334
<listitem><simpara> Antialiasing.
335
</simpara></listitem></varlistentry>
336
<varlistentry><term><parameter>feather</parameter> :</term>
337
<listitem><simpara> Feather option for selections.
338
</simpara></listitem></varlistentry>
339
<varlistentry><term><parameter>feather_radius</parameter> :</term>
340
<listitem><simpara> Radius for feather operation.
341
</simpara></listitem></varlistentry>
342
<varlistentry><term><parameter>sample_merged</parameter> :</term>
343
<listitem><simpara> Use the composite image, not the drawable.
344
</simpara></listitem></varlistentry>
345
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> TRUE on success.
346
</simpara></listitem></varlistentry>
347
</variablelist></refsect2>
348
<refsect2 id="gimp-by-color-select-full" role="function" condition="since:GIMP 2.4">
349
<title>gimp_by_color_select_full ()</title>
350
<indexterm zone="gimp-by-color-select-full" role="GIMP 2.4"><primary sortas="gimp_by_color_select_full">gimp_by_color_select_full</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_by_color_select_full (<link linkend="gint32">gint32</link> drawable_ID,
351
const <link linkend="GimpRGB">GimpRGB</link> *color,
352
<link linkend="gint">gint</link> threshold,
353
<link linkend="GimpChannelOps">GimpChannelOps</link> operation,
354
<link linkend="gboolean">gboolean</link> antialias,
355
<link linkend="gboolean">gboolean</link> feather,
356
<link linkend="gdouble">gdouble</link> feather_radius_x,
357
<link linkend="gdouble">gdouble</link> feather_radius_y,
358
<link linkend="gboolean">gboolean</link> sample_merged,
359
<link linkend="gboolean">gboolean</link> select_transparent,
360
<link linkend="GimpSelectCriterion">GimpSelectCriterion</link> select_criterion);</programlisting>
362
Create a selection by selecting all pixels (in the specified
363
drawable) with the same (or similar) color to that specified.
366
This tool creates a selection over the specified image. A by-color
367
selection is determined by the supplied color under the constraints
368
of the specified threshold. Essentially, all pixels (in the
369
drawable) that have color sufficiently close to the specified color
370
(as determined by the threshold value) are included in the
371
selection. To select transparent regions, the color specified must
372
also have minimum alpha. The antialiasing parameter allows the final
373
selection mask to contain intermediate values based on close misses
374
to the threshold bar. Feathering can be enabled optionally and is
375
controlled with the 'feather-radius' parameter. If the
376
'sample-merged' parameter is TRUE, the data of the composite image
377
will be used instead of that for the specified drawable. This is
378
equivalent to sampling for colors after merging all visible layers.
379
In the case of a merged sampling, the supplied drawable is ignored.</para>
381
</para><variablelist role="params">
382
<varlistentry><term><parameter>drawable_ID</parameter> :</term>
383
<listitem><simpara> The affected drawable.
384
</simpara></listitem></varlistentry>
385
<varlistentry><term><parameter>color</parameter> :</term>
386
<listitem><simpara> The color to select.
387
</simpara></listitem></varlistentry>
388
<varlistentry><term><parameter>threshold</parameter> :</term>
389
<listitem><simpara> Threshold in intensity levels.
390
</simpara></listitem></varlistentry>
391
<varlistentry><term><parameter>operation</parameter> :</term>
392
<listitem><simpara> The selection operation.
393
</simpara></listitem></varlistentry>
394
<varlistentry><term><parameter>antialias</parameter> :</term>
395
<listitem><simpara> Antialiasing.
396
</simpara></listitem></varlistentry>
397
<varlistentry><term><parameter>feather</parameter> :</term>
398
<listitem><simpara> Feather option for selections.
399
</simpara></listitem></varlistentry>
400
<varlistentry><term><parameter>feather_radius_x</parameter> :</term>
401
<listitem><simpara> Radius for feather operation in X direction.
402
</simpara></listitem></varlistentry>
403
<varlistentry><term><parameter>feather_radius_y</parameter> :</term>
404
<listitem><simpara> Radius for feather operation in Y direction.
405
</simpara></listitem></varlistentry>
406
<varlistentry><term><parameter>sample_merged</parameter> :</term>
407
<listitem><simpara> Use the composite image, not the drawable.
408
</simpara></listitem></varlistentry>
409
<varlistentry><term><parameter>select_transparent</parameter> :</term>
410
<listitem><simpara> Whether to consider transparent pixels for selection. If TRUE, transparency is considered as a unique selectable color.
411
</simpara></listitem></varlistentry>
412
<varlistentry><term><parameter>select_criterion</parameter> :</term>
413
<listitem><simpara> The criterion used to determine color similarity. SELECT_CRITERION_COMPOSITE is the standard choice.
414
</simpara></listitem></varlistentry>
415
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> TRUE on success.
417
</simpara></listitem></varlistentry>
418
</variablelist><para role="since">Since GIMP 2.4</para></refsect2>
419
<refsect2 id="gimp-clone" role="function">
420
<title>gimp_clone ()</title>
421
<indexterm zone="gimp-clone"><primary sortas="gimp_clone">gimp_clone</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_clone (<link linkend="gint32">gint32</link> drawable_ID,
422
<link linkend="gint32">gint32</link> src_drawable_ID,
423
<link linkend="GimpCloneType">GimpCloneType</link> clone_type,
424
<link linkend="gdouble">gdouble</link> src_x,
425
<link linkend="gdouble">gdouble</link> src_y,
426
<link linkend="gint">gint</link> num_strokes,
427
const <link linkend="gdouble">gdouble</link> *strokes);</programlisting>
429
Clone from the source to the dest drawable using the current brush
432
This tool clones (copies) from the source drawable starting at the
433
specified source coordinates to the dest drawable. If the
434
\"clone_type\" argument is set to PATTERN-CLONE, then the current
435
pattern is used as the source and the \"src_drawable\" argument is
436
ignored. Pattern cloning assumes a tileable pattern and mods the sum
437
of the src coordinates and subsequent stroke offsets with the width
438
and height of the pattern. For image cloning, if the sum of the src
439
coordinates and subsequent stroke offsets exceeds the extents of the
440
src drawable, then no paint is transferred. The clone tool is
441
capable of transforming between any image types including
442
RGB->Indexed--although converting from any type to indexed is
443
significantly slower.</para>
445
</para><variablelist role="params">
446
<varlistentry><term><parameter>drawable_ID</parameter> :</term>
447
<listitem><simpara> The affected drawable.
448
</simpara></listitem></varlistentry>
449
<varlistentry><term><parameter>src_drawable_ID</parameter> :</term>
450
<listitem><simpara> The source drawable.
451
</simpara></listitem></varlistentry>
452
<varlistentry><term><parameter>clone_type</parameter> :</term>
453
<listitem><simpara> The type of clone.
454
</simpara></listitem></varlistentry>
455
<varlistentry><term><parameter>src_x</parameter> :</term>
456
<listitem><simpara> The x coordinate in the source image.
457
</simpara></listitem></varlistentry>
458
<varlistentry><term><parameter>src_y</parameter> :</term>
459
<listitem><simpara> The y coordinate in the source image.
460
</simpara></listitem></varlistentry>
461
<varlistentry><term><parameter>num_strokes</parameter> :</term>
462
<listitem><simpara> Number of stroke control points (count each coordinate as 2 points).
463
</simpara></listitem></varlistentry>
464
<varlistentry><term><parameter>strokes</parameter> :</term>
465
<listitem><simpara> Array of stroke coordinates: { s1.x, s1.y, s2.x, s2.y, ..., sn.x, sn.y }.
466
</simpara></listitem></varlistentry>
467
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> TRUE on success.
468
</simpara></listitem></varlistentry>
469
</variablelist></refsect2>
470
<refsect2 id="gimp-clone-default" role="function">
471
<title>gimp_clone_default ()</title>
472
<indexterm zone="gimp-clone-default"><primary sortas="gimp_clone_default">gimp_clone_default</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_clone_default (<link linkend="gint32">gint32</link> drawable_ID,
473
<link linkend="gint">gint</link> num_strokes,
474
const <link linkend="gdouble">gdouble</link> *strokes);</programlisting>
476
Clone from the source to the dest drawable using the current brush
479
This tool clones (copies) from the source drawable starting at the
480
specified source coordinates to the dest drawable. This function
481
performs exactly the same as the <link linkend="gimp-clone"><function>gimp_clone()</function></link> function except that
482
the tools arguments are obtained from the clones option dialog. It
483
this dialog has not been activated then the dialogs default values
486
</para><variablelist role="params">
487
<varlistentry><term><parameter>drawable_ID</parameter> :</term>
488
<listitem><simpara> The affected drawable.
489
</simpara></listitem></varlistentry>
490
<varlistentry><term><parameter>num_strokes</parameter> :</term>
491
<listitem><simpara> Number of stroke control points (count each coordinate as 2 points).
492
</simpara></listitem></varlistentry>
493
<varlistentry><term><parameter>strokes</parameter> :</term>
494
<listitem><simpara> Array of stroke coordinates: { s1.x, s1.y, s2.x, s2.y, ..., sn.x, sn.y }.
495
</simpara></listitem></varlistentry>
496
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> TRUE on success.
497
</simpara></listitem></varlistentry>
498
</variablelist></refsect2>
499
<refsect2 id="gimp-convolve" role="function">
500
<title>gimp_convolve ()</title>
501
<indexterm zone="gimp-convolve"><primary sortas="gimp_convolve">gimp_convolve</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_convolve (<link linkend="gint32">gint32</link> drawable_ID,
502
<link linkend="gdouble">gdouble</link> pressure,
503
<link linkend="GimpConvolveType">GimpConvolveType</link> convolve_type,
504
<link linkend="gint">gint</link> num_strokes,
505
const <link linkend="gdouble">gdouble</link> *strokes);</programlisting>
507
Convolve (Blur, Sharpen) using the current brush.
510
This tool convolves the specified drawable with either a sharpening
511
or blurring kernel. The pressure parameter controls the magnitude of
512
the operation. Like the paintbrush, this tool linearly interpolates
513
between the specified stroke coordinates.</para>
515
</para><variablelist role="params">
516
<varlistentry><term><parameter>drawable_ID</parameter> :</term>
517
<listitem><simpara> The affected drawable.
518
</simpara></listitem></varlistentry>
519
<varlistentry><term><parameter>pressure</parameter> :</term>
520
<listitem><simpara> The pressure.
521
</simpara></listitem></varlistentry>
522
<varlistentry><term><parameter>convolve_type</parameter> :</term>
523
<listitem><simpara> Convolve type.
524
</simpara></listitem></varlistentry>
525
<varlistentry><term><parameter>num_strokes</parameter> :</term>
526
<listitem><simpara> Number of stroke control points (count each coordinate as 2 points).
527
</simpara></listitem></varlistentry>
528
<varlistentry><term><parameter>strokes</parameter> :</term>
529
<listitem><simpara> Array of stroke coordinates: { s1.x, s1.y, s2.x, s2.y, ..., sn.x, sn.y }.
530
</simpara></listitem></varlistentry>
531
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> TRUE on success.
532
</simpara></listitem></varlistentry>
533
</variablelist></refsect2>
534
<refsect2 id="gimp-convolve-default" role="function">
535
<title>gimp_convolve_default ()</title>
536
<indexterm zone="gimp-convolve-default"><primary sortas="gimp_convolve_default">gimp_convolve_default</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_convolve_default (<link linkend="gint32">gint32</link> drawable_ID,
537
<link linkend="gint">gint</link> num_strokes,
538
const <link linkend="gdouble">gdouble</link> *strokes);</programlisting>
540
Convolve (Blur, Sharpen) using the current brush.
543
This tool convolves the specified drawable with either a sharpening
544
or blurring kernel. This function performs exactly the same as the
545
<link linkend="gimp-convolve"><function>gimp_convolve()</function></link> function except that the tools arguments are
546
obtained from the convolve option dialog. It this dialog has not
547
been activated then the dialogs default values will be used.</para>
549
</para><variablelist role="params">
550
<varlistentry><term><parameter>drawable_ID</parameter> :</term>
551
<listitem><simpara> The affected drawable.
552
</simpara></listitem></varlistentry>
553
<varlistentry><term><parameter>num_strokes</parameter> :</term>
554
<listitem><simpara> Number of stroke control points (count each coordinate as 2 points).
555
</simpara></listitem></varlistentry>
556
<varlistentry><term><parameter>strokes</parameter> :</term>
557
<listitem><simpara> Array of stroke coordinates: { s1.x, s1.y, s2.x, s2.y, ..., sn.x, sn.y }.
558
</simpara></listitem></varlistentry>
559
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> TRUE on success.
560
</simpara></listitem></varlistentry>
561
</variablelist></refsect2>
562
<refsect2 id="gimp-dodgeburn" role="function">
563
<title>gimp_dodgeburn ()</title>
564
<indexterm zone="gimp-dodgeburn"><primary sortas="gimp_dodgeburn">gimp_dodgeburn</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_dodgeburn (<link linkend="gint32">gint32</link> drawable_ID,
565
<link linkend="gdouble">gdouble</link> exposure,
566
<link linkend="GimpDodgeBurnType">GimpDodgeBurnType</link> dodgeburn_type,
567
<link linkend="GimpTransferMode">GimpTransferMode</link> dodgeburn_mode,
568
<link linkend="gint">gint</link> num_strokes,
569
const <link linkend="gdouble">gdouble</link> *strokes);</programlisting>
571
Dodgeburn image with varying exposure.
574
Dodgeburn. More details here later.</para>
576
</para><variablelist role="params">
577
<varlistentry><term><parameter>drawable_ID</parameter> :</term>
578
<listitem><simpara> The affected drawable.
579
</simpara></listitem></varlistentry>
580
<varlistentry><term><parameter>exposure</parameter> :</term>
581
<listitem><simpara> The exposure of the strokes.
582
</simpara></listitem></varlistentry>
583
<varlistentry><term><parameter>dodgeburn_type</parameter> :</term>
584
<listitem><simpara> The type either dodge or burn.
585
</simpara></listitem></varlistentry>
586
<varlistentry><term><parameter>dodgeburn_mode</parameter> :</term>
587
<listitem><simpara> The mode.
588
</simpara></listitem></varlistentry>
589
<varlistentry><term><parameter>num_strokes</parameter> :</term>
590
<listitem><simpara> Number of stroke control points (count each coordinate as 2 points).
591
</simpara></listitem></varlistentry>
592
<varlistentry><term><parameter>strokes</parameter> :</term>
593
<listitem><simpara> Array of stroke coordinates: { s1.x, s1.y, s2.x, s2.y, ..., sn.x, sn.y }.
594
</simpara></listitem></varlistentry>
595
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> TRUE on success.
596
</simpara></listitem></varlistentry>
597
</variablelist></refsect2>
598
<refsect2 id="gimp-dodgeburn-default" role="function">
599
<title>gimp_dodgeburn_default ()</title>
600
<indexterm zone="gimp-dodgeburn-default"><primary sortas="gimp_dodgeburn_default">gimp_dodgeburn_default</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_dodgeburn_default (<link linkend="gint32">gint32</link> drawable_ID,
601
<link linkend="gint">gint</link> num_strokes,
602
const <link linkend="gdouble">gdouble</link> *strokes);</programlisting>
604
Dodgeburn image with varying exposure. This is the same as the
605
<link linkend="gimp-dodgeburn"><function>gimp_dodgeburn()</function></link> function except that the exposure, type and mode
606
are taken from the tools option dialog. If the dialog has not been
607
activated then the defaults as used by the dialog will be used.
610
Dodgeburn. More details here later.</para>
612
</para><variablelist role="params">
613
<varlistentry><term><parameter>drawable_ID</parameter> :</term>
614
<listitem><simpara> The affected drawable.
615
</simpara></listitem></varlistentry>
616
<varlistentry><term><parameter>num_strokes</parameter> :</term>
617
<listitem><simpara> Number of stroke control points (count each coordinate as 2 points).
618
</simpara></listitem></varlistentry>
619
<varlistentry><term><parameter>strokes</parameter> :</term>
620
<listitem><simpara> Array of stroke coordinates: { s1.x, s1.y, s2.x, s2.y, ..., sn.x, sn.y }.
621
</simpara></listitem></varlistentry>
622
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> TRUE on success.
623
</simpara></listitem></varlistentry>
624
</variablelist></refsect2>
625
<refsect2 id="gimp-edit-bucket-fill-full" role="function" condition="since:GIMP 2.4">
626
<title>gimp_edit_bucket_fill_full ()</title>
627
<indexterm zone="gimp-edit-bucket-fill-full" role="GIMP 2.4"><primary sortas="gimp_edit_bucket_fill_full">gimp_edit_bucket_fill_full</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_edit_bucket_fill_full (<link linkend="gint32">gint32</link> drawable_ID,
628
<link linkend="GimpBucketFillMode">GimpBucketFillMode</link> fill_mode,
629
<link linkend="GimpLayerModeEffects">GimpLayerModeEffects</link> paint_mode,
630
<link linkend="gdouble">gdouble</link> opacity,
631
<link linkend="gdouble">gdouble</link> threshold,
632
<link linkend="gboolean">gboolean</link> sample_merged,
633
<link linkend="gboolean">gboolean</link> fill_transparent,
634
<link linkend="GimpSelectCriterion">GimpSelectCriterion</link> select_criterion,
635
<link linkend="gdouble">gdouble</link> x,
636
<link linkend="gdouble">gdouble</link> y);</programlisting>
638
Fill the area specified either by the current selection if there is
639
one, or by a seed fill starting at the specified coordinates.
642
This tool requires information on the paint application mode, and
643
the fill mode, which can either be in the foreground color, or in
644
the currently active pattern. If there is no selection, a seed fill
645
is executed at the specified coordinates and extends outward in
646
keeping with the threshold parameter. If there is a selection in the
647
target image, the threshold, sample merged, x, and y arguments are
648
unused. If the sample_merged parameter is TRUE, the data of the
649
composite image will be used instead of that for the specified
650
drawable. This is equivalent to sampling for colors after merging
651
all visible layers. In the case of merged sampling, the x and y
652
coordinates are relative to the image's origin; otherwise, they are
653
relative to the drawable's origin.</para>
655
</para><variablelist role="params">
656
<varlistentry><term><parameter>drawable_ID</parameter> :</term>
657
<listitem><simpara> The affected drawable.
658
</simpara></listitem></varlistentry>
659
<varlistentry><term><parameter>fill_mode</parameter> :</term>
660
<listitem><simpara> The type of fill.
661
</simpara></listitem></varlistentry>
662
<varlistentry><term><parameter>paint_mode</parameter> :</term>
663
<listitem><simpara> The paint application mode.
664
</simpara></listitem></varlistentry>
665
<varlistentry><term><parameter>opacity</parameter> :</term>
666
<listitem><simpara> The opacity of the final bucket fill.
667
</simpara></listitem></varlistentry>
668
<varlistentry><term><parameter>threshold</parameter> :</term>
669
<listitem><simpara> The threshold determines how extensive the seed fill will be. It's value is specified in terms of intensity levels. This parameter is only valid when there is no selection in the specified image.
670
</simpara></listitem></varlistentry>
671
<varlistentry><term><parameter>sample_merged</parameter> :</term>
672
<listitem><simpara> Use the composite image, not the drawable.
673
</simpara></listitem></varlistentry>
674
<varlistentry><term><parameter>fill_transparent</parameter> :</term>
675
<listitem><simpara> Whether to consider transparent pixels for filling. If TRUE, transparency is considered as a unique fillable color.
676
</simpara></listitem></varlistentry>
677
<varlistentry><term><parameter>select_criterion</parameter> :</term>
678
<listitem><simpara> The criterion used to determine color similarity. SELECT_CRITERION_COMPOSITE is the standard choice.
679
</simpara></listitem></varlistentry>
680
<varlistentry><term><parameter>x</parameter> :</term>
681
<listitem><simpara> The x coordinate of this bucket fill's application. This parameter is only valid when there is no selection in the specified image.
682
</simpara></listitem></varlistentry>
683
<varlistentry><term><parameter>y</parameter> :</term>
684
<listitem><simpara> The y coordinate of this bucket fill's application. This parameter is only valid when there is no selection in the specified image.
685
</simpara></listitem></varlistentry>
686
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> TRUE on success.
688
</simpara></listitem></varlistentry>
689
</variablelist><para role="since">Since GIMP 2.4</para></refsect2>
690
<refsect2 id="gimp-ellipse-select" role="function">
691
<title>gimp_ellipse_select ()</title>
692
<indexterm zone="gimp-ellipse-select"><primary sortas="gimp_ellipse_select">gimp_ellipse_select</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_ellipse_select (<link linkend="gint32">gint32</link> image_ID,
693
<link linkend="gdouble">gdouble</link> x,
694
<link linkend="gdouble">gdouble</link> y,
695
<link linkend="gdouble">gdouble</link> width,
696
<link linkend="gdouble">gdouble</link> height,
697
<link linkend="GimpChannelOps">GimpChannelOps</link> operation,
698
<link linkend="gboolean">gboolean</link> antialias,
699
<link linkend="gboolean">gboolean</link> feather,
700
<link linkend="gdouble">gdouble</link> feather_radius);</programlisting>
702
Create an elliptical selection over the specified image.
705
This tool creates an elliptical selection over the specified image.
706
The elliptical region can be either added to, subtracted from, or
707
replace the contents of the previous selection mask. If antialiasing
708
is turned on, the edges of the elliptical region will contain
709
intermediate values which give the appearance of a sharper, less
710
pixelized edge. This should be set as TRUE most of the time. If the
711
feather option is enabled, the resulting selection is blurred before
712
combining. The blur is a gaussian blur with the specified feather
715
</para><variablelist role="params">
716
<varlistentry><term><parameter>image_ID</parameter> :</term>
717
<listitem><simpara> The image.
718
</simpara></listitem></varlistentry>
719
<varlistentry><term><parameter>x</parameter> :</term>
720
<listitem><simpara> x coordinate of upper-left corner of ellipse bounding box.
721
</simpara></listitem></varlistentry>
722
<varlistentry><term><parameter>y</parameter> :</term>
723
<listitem><simpara> y coordinate of upper-left corner of ellipse bounding box.
724
</simpara></listitem></varlistentry>
725
<varlistentry><term><parameter>width</parameter> :</term>
726
<listitem><simpara> The width of the ellipse.
727
</simpara></listitem></varlistentry>
728
<varlistentry><term><parameter>height</parameter> :</term>
729
<listitem><simpara> The height of the ellipse.
730
</simpara></listitem></varlistentry>
731
<varlistentry><term><parameter>operation</parameter> :</term>
732
<listitem><simpara> The selection operation.
733
</simpara></listitem></varlistentry>
734
<varlistentry><term><parameter>antialias</parameter> :</term>
735
<listitem><simpara> Antialiasing.
736
</simpara></listitem></varlistentry>
737
<varlistentry><term><parameter>feather</parameter> :</term>
738
<listitem><simpara> Feather option for selections.
739
</simpara></listitem></varlistentry>
740
<varlistentry><term><parameter>feather_radius</parameter> :</term>
741
<listitem><simpara> Radius for feather operation.
742
</simpara></listitem></varlistentry>
743
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> TRUE on success.
744
</simpara></listitem></varlistentry>
745
</variablelist></refsect2>
746
<refsect2 id="gimp-eraser" role="function">
747
<title>gimp_eraser ()</title>
748
<indexterm zone="gimp-eraser"><primary sortas="gimp_eraser">gimp_eraser</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_eraser (<link linkend="gint32">gint32</link> drawable_ID,
749
<link linkend="gint">gint</link> num_strokes,
750
const <link linkend="gdouble">gdouble</link> *strokes,
751
<link linkend="GimpBrushApplicationMode">GimpBrushApplicationMode</link> hardness,
752
<link linkend="GimpPaintApplicationMode">GimpPaintApplicationMode</link> method);</programlisting>
754
Erase using the current brush.
757
This tool erases using the current brush mask. If the specified
758
drawable contains an alpha channel, then the erased pixels will
759
become transparent. Otherwise, the eraser tool replaces the contents
760
of the drawable with the background color. Like paintbrush, this
761
tool linearly interpolates between the specified stroke coordinates.</para>
763
</para><variablelist role="params">
764
<varlistentry><term><parameter>drawable_ID</parameter> :</term>
765
<listitem><simpara> The affected drawable.
766
</simpara></listitem></varlistentry>
767
<varlistentry><term><parameter>num_strokes</parameter> :</term>
768
<listitem><simpara> Number of stroke control points (count each coordinate as 2 points).
769
</simpara></listitem></varlistentry>
770
<varlistentry><term><parameter>strokes</parameter> :</term>
771
<listitem><simpara> Array of stroke coordinates: { s1.x, s1.y, s2.x, s2.y, ..., sn.x, sn.y }.
772
</simpara></listitem></varlistentry>
773
<varlistentry><term><parameter>hardness</parameter> :</term>
774
<listitem><simpara> How to apply the brush.
775
</simpara></listitem></varlistentry>
776
<varlistentry><term><parameter>method</parameter> :</term>
777
<listitem><simpara> The paint method to use.
778
</simpara></listitem></varlistentry>
779
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> TRUE on success.
780
</simpara></listitem></varlistentry>
781
</variablelist></refsect2>
782
<refsect2 id="gimp-eraser-default" role="function">
783
<title>gimp_eraser_default ()</title>
784
<indexterm zone="gimp-eraser-default"><primary sortas="gimp_eraser_default">gimp_eraser_default</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_eraser_default (<link linkend="gint32">gint32</link> drawable_ID,
785
<link linkend="gint">gint</link> num_strokes,
786
const <link linkend="gdouble">gdouble</link> *strokes);</programlisting>
788
Erase using the current brush.
791
This tool erases using the current brush mask. This function
792
performs exactly the same as the <link linkend="gimp-eraser"><function>gimp_eraser()</function></link> function except that
793
the tools arguments are obtained from the eraser option dialog. It
794
this dialog has not been activated then the dialogs default values
797
</para><variablelist role="params">
798
<varlistentry><term><parameter>drawable_ID</parameter> :</term>
799
<listitem><simpara> The affected drawable.
800
</simpara></listitem></varlistentry>
801
<varlistentry><term><parameter>num_strokes</parameter> :</term>
802
<listitem><simpara> Number of stroke control points (count each coordinate as 2 points).
803
</simpara></listitem></varlistentry>
804
<varlistentry><term><parameter>strokes</parameter> :</term>
805
<listitem><simpara> Array of stroke coordinates: { s1.x, s1.y, s2.x, s2.y, ..., sn.x, sn.y }.
806
</simpara></listitem></varlistentry>
807
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> TRUE on success.
808
</simpara></listitem></varlistentry>
809
</variablelist></refsect2>
810
<refsect2 id="gimp-flip" role="function" condition="deprecated:">
811
<title>gimp_flip ()</title>
812
<indexterm zone="gimp-flip" role="deprecated"><primary sortas="gimp_flip">gimp_flip</primary></indexterm><programlisting><link linkend="gint32">gint32</link> gimp_flip (<link linkend="gint32">gint32</link> drawable_ID,
813
<link linkend="GimpOrientationType">GimpOrientationType</link> flip_type);</programlisting>
814
<warning><para><literal>gimp_flip</literal> is deprecated and should not be used in newly-written code.</para></warning>
816
This procedure is deprecated! Use
817
<link linkend="gimp-drawable-transform-flip-simple"><function>gimp_drawable_transform_flip_simple()</function></link> instead.</para>
819
</para><variablelist role="params">
820
<varlistentry><term><parameter>drawable_ID</parameter> :</term>
821
<listitem><simpara> The affected drawable.
822
</simpara></listitem></varlistentry>
823
<varlistentry><term><parameter>flip_type</parameter> :</term>
824
<listitem><simpara> Type of flip.
825
</simpara></listitem></varlistentry>
826
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> The flipped drawable.
827
</simpara></listitem></varlistentry>
828
</variablelist></refsect2>
829
<refsect2 id="gimp-free-select" role="function">
830
<title>gimp_free_select ()</title>
831
<indexterm zone="gimp-free-select"><primary sortas="gimp_free_select">gimp_free_select</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_free_select (<link linkend="gint32">gint32</link> image_ID,
832
<link linkend="gint">gint</link> num_segs,
833
const <link linkend="gdouble">gdouble</link> *segs,
834
<link linkend="GimpChannelOps">GimpChannelOps</link> operation,
835
<link linkend="gboolean">gboolean</link> antialias,
836
<link linkend="gboolean">gboolean</link> feather,
837
<link linkend="gdouble">gdouble</link> feather_radius);</programlisting>
839
Create a polygonal selection over the specified image.
842
This tool creates a polygonal selection over the specified image.
843
The polygonal region can be either added to, subtracted from, or
844
replace the contents of the previous selection mask. The polygon is
845
specified through an array of floating point numbers and its length.
846
The length of array must be 2n, where n is the number of points.
847
Each point is defined by 2 floating point values which correspond to
848
the x and y coordinates. If the final point does not connect to the
849
starting point, a connecting segment is automatically added. If the
850
feather option is enabled, the resulting selection is blurred before
851
combining. The blur is a gaussian blur with the specified feather
854
</para><variablelist role="params">
855
<varlistentry><term><parameter>image_ID</parameter> :</term>
856
<listitem><simpara> The image.
857
</simpara></listitem></varlistentry>
858
<varlistentry><term><parameter>num_segs</parameter> :</term>
859
<listitem><simpara> Number of points (count 1 coordinate as two points).
860
</simpara></listitem></varlistentry>
861
<varlistentry><term><parameter>segs</parameter> :</term>
862
<listitem><simpara> Array of points: { p1.x, p1.y, p2.x, p2.y, ..., pn.x, pn.y}.
863
</simpara></listitem></varlistentry>
864
<varlistentry><term><parameter>operation</parameter> :</term>
865
<listitem><simpara> The selection operation.
866
</simpara></listitem></varlistentry>
867
<varlistentry><term><parameter>antialias</parameter> :</term>
868
<listitem><simpara> Antialiasing.
869
</simpara></listitem></varlistentry>
870
<varlistentry><term><parameter>feather</parameter> :</term>
871
<listitem><simpara> Feather option for selections.
872
</simpara></listitem></varlistentry>
873
<varlistentry><term><parameter>feather_radius</parameter> :</term>
874
<listitem><simpara> Radius for feather operation.
875
</simpara></listitem></varlistentry>
876
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> TRUE on success.
877
</simpara></listitem></varlistentry>
878
</variablelist></refsect2>
879
<refsect2 id="gimp-fuzzy-select" role="function">
880
<title>gimp_fuzzy_select ()</title>
881
<indexterm zone="gimp-fuzzy-select"><primary sortas="gimp_fuzzy_select">gimp_fuzzy_select</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_fuzzy_select (<link linkend="gint32">gint32</link> drawable_ID,
882
<link linkend="gdouble">gdouble</link> x,
883
<link linkend="gdouble">gdouble</link> y,
884
<link linkend="gint">gint</link> threshold,
885
<link linkend="GimpChannelOps">GimpChannelOps</link> operation,
886
<link linkend="gboolean">gboolean</link> antialias,
887
<link linkend="gboolean">gboolean</link> feather,
888
<link linkend="gdouble">gdouble</link> feather_radius,
889
<link linkend="gboolean">gboolean</link> sample_merged);</programlisting>
891
Create a fuzzy selection starting at the specified coordinates on
892
the specified drawable.
895
This tool creates a fuzzy selection over the specified image. A
896
fuzzy selection is determined by a seed fill under the constraints
897
of the specified threshold. Essentially, the color at the specified
898
coordinates (in the drawable) is measured and the selection expands
899
outwards from that point to any adjacent pixels which are not
900
significantly different (as determined by the threshold value). This
901
process continues until no more expansion is possible. The
902
antialiasing parameter allows the final selection mask to contain
903
intermediate values based on close misses to the threshold bar at
904
pixels along the seed fill boundary. Feathering can be enabled
905
optionally and is controlled with the 'feather-radius' paramter. If
906
the 'sample-merged' parameter is TRUE, the data of the composite
907
image will be used instead of that for the specified drawable. This
908
is equivalent to sampling for colors after merging all visible
909
layers. In the case of a merged sampling, the supplied drawable is
910
ignored. If the sample is merged, the specified coordinates are
911
relative to the image origin; otherwise, they are relative to the
912
drawable's origin.</para>
914
</para><variablelist role="params">
915
<varlistentry><term><parameter>drawable_ID</parameter> :</term>
916
<listitem><simpara> The affected drawable.
917
</simpara></listitem></varlistentry>
918
<varlistentry><term><parameter>x</parameter> :</term>
919
<listitem><simpara> x coordinate of initial seed fill point: (image coordinates).
920
</simpara></listitem></varlistentry>
921
<varlistentry><term><parameter>y</parameter> :</term>
922
<listitem><simpara> y coordinate of initial seed fill point: (image coordinates).
923
</simpara></listitem></varlistentry>
924
<varlistentry><term><parameter>threshold</parameter> :</term>
925
<listitem><simpara> Threshold in intensity levels.
926
</simpara></listitem></varlistentry>
927
<varlistentry><term><parameter>operation</parameter> :</term>
928
<listitem><simpara> The selection operation.
929
</simpara></listitem></varlistentry>
930
<varlistentry><term><parameter>antialias</parameter> :</term>
931
<listitem><simpara> Antialiasing.
932
</simpara></listitem></varlistentry>
933
<varlistentry><term><parameter>feather</parameter> :</term>
934
<listitem><simpara> Feather option for selections.
935
</simpara></listitem></varlistentry>
936
<varlistentry><term><parameter>feather_radius</parameter> :</term>
937
<listitem><simpara> Radius for feather operation.
938
</simpara></listitem></varlistentry>
939
<varlistentry><term><parameter>sample_merged</parameter> :</term>
940
<listitem><simpara> Use the composite image, not the drawable.
941
</simpara></listitem></varlistentry>
942
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> TRUE on success.
943
</simpara></listitem></varlistentry>
944
</variablelist></refsect2>
945
<refsect2 id="gimp-fuzzy-select-full" role="function" condition="since:GIMP 2.4">
946
<title>gimp_fuzzy_select_full ()</title>
947
<indexterm zone="gimp-fuzzy-select-full" role="GIMP 2.4"><primary sortas="gimp_fuzzy_select_full">gimp_fuzzy_select_full</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_fuzzy_select_full (<link linkend="gint32">gint32</link> drawable_ID,
948
<link linkend="gdouble">gdouble</link> x,
949
<link linkend="gdouble">gdouble</link> y,
950
<link linkend="gint">gint</link> threshold,
951
<link linkend="GimpChannelOps">GimpChannelOps</link> operation,
952
<link linkend="gboolean">gboolean</link> antialias,
953
<link linkend="gboolean">gboolean</link> feather,
954
<link linkend="gdouble">gdouble</link> feather_radius_x,
955
<link linkend="gdouble">gdouble</link> feather_radius_y,
956
<link linkend="gboolean">gboolean</link> sample_merged,
957
<link linkend="gboolean">gboolean</link> select_transparent,
958
<link linkend="GimpSelectCriterion">GimpSelectCriterion</link> select_criterion);</programlisting>
960
Create a fuzzy selection starting at the specified coordinates on
961
the specified drawable.
964
This tool creates a fuzzy selection over the specified image. A
965
fuzzy selection is determined by a seed fill under the constraints
966
of the specified threshold. Essentially, the color at the specified
967
coordinates (in the drawable) is measured and the selection expands
968
outwards from that point to any adjacent pixels which are not
969
significantly different (as determined by the threshold value). This
970
process continues until no more expansion is possible. The
971
antialiasing parameter allows the final selection mask to contain
972
intermediate values based on close misses to the threshold bar at
973
pixels along the seed fill boundary. Feathering can be enabled
974
optionally and is controlled with the 'feather-radius' paramter. If
975
the 'sample-merged' parameter is TRUE, the data of the composite
976
image will be used instead of that for the specified drawable. This
977
is equivalent to sampling for colors after merging all visible
978
layers. In the case of a merged sampling, the supplied drawable is
979
ignored. If the sample is merged, the specified coordinates are
980
relative to the image origin; otherwise, they are relative to the
981
drawable's origin.</para>
983
</para><variablelist role="params">
984
<varlistentry><term><parameter>drawable_ID</parameter> :</term>
985
<listitem><simpara> The affected drawable.
986
</simpara></listitem></varlistentry>
987
<varlistentry><term><parameter>x</parameter> :</term>
988
<listitem><simpara> x coordinate of initial seed fill point: (image coordinates).
989
</simpara></listitem></varlistentry>
990
<varlistentry><term><parameter>y</parameter> :</term>
991
<listitem><simpara> y coordinate of initial seed fill point: (image coordinates).
992
</simpara></listitem></varlistentry>
993
<varlistentry><term><parameter>threshold</parameter> :</term>
994
<listitem><simpara> Threshold in intensity levels.
995
</simpara></listitem></varlistentry>
996
<varlistentry><term><parameter>operation</parameter> :</term>
997
<listitem><simpara> The selection operation.
998
</simpara></listitem></varlistentry>
999
<varlistentry><term><parameter>antialias</parameter> :</term>
1000
<listitem><simpara> Antialiasing.
1001
</simpara></listitem></varlistentry>
1002
<varlistentry><term><parameter>feather</parameter> :</term>
1003
<listitem><simpara> Feather option for selections.
1004
</simpara></listitem></varlistentry>
1005
<varlistentry><term><parameter>feather_radius_x</parameter> :</term>
1006
<listitem><simpara> Radius for feather operation in X direction.
1007
</simpara></listitem></varlistentry>
1008
<varlistentry><term><parameter>feather_radius_y</parameter> :</term>
1009
<listitem><simpara> Radius for feather operation in Y direction.
1010
</simpara></listitem></varlistentry>
1011
<varlistentry><term><parameter>sample_merged</parameter> :</term>
1012
<listitem><simpara> Use the composite image, not the drawable.
1013
</simpara></listitem></varlistentry>
1014
<varlistentry><term><parameter>select_transparent</parameter> :</term>
1015
<listitem><simpara> Whether to consider transparent pixels for selection. If TRUE, transparency is considered as a unique selectable color.
1016
</simpara></listitem></varlistentry>
1017
<varlistentry><term><parameter>select_criterion</parameter> :</term>
1018
<listitem><simpara> The criterion used to determine color similarity. SELECT_CRITERION_COMPOSITE is the standard choice.
1019
</simpara></listitem></varlistentry>
1020
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> TRUE on success.
1022
</simpara></listitem></varlistentry>
1023
</variablelist><para role="since">Since GIMP 2.4</para></refsect2>
1024
<refsect2 id="gimp-heal" role="function" condition="since:GIMP 2.4">
1025
<title>gimp_heal ()</title>
1026
<indexterm zone="gimp-heal" role="GIMP 2.4"><primary sortas="gimp_heal">gimp_heal</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_heal (<link linkend="gint32">gint32</link> drawable_ID,
1027
<link linkend="gint32">gint32</link> src_drawable_ID,
1028
<link linkend="gdouble">gdouble</link> src_x,
1029
<link linkend="gdouble">gdouble</link> src_y,
1030
<link linkend="gint">gint</link> num_strokes,
1031
const <link linkend="gdouble">gdouble</link> *strokes);</programlisting>
1033
Heal from the source to the dest drawable using the current brush
1036
This tool heals the source drawable starting at the specified source
1037
coordinates to the dest drawable. For image healing, if the sum of
1038
the src coordinates and subsequent stroke offsets exceeds the
1039
extents of the src drawable, then no paint is transferred. The
1040
healing tool is capable of transforming between any image types
1041
except RGB->Indexed.</para>
1043
</para><variablelist role="params">
1044
<varlistentry><term><parameter>drawable_ID</parameter> :</term>
1045
<listitem><simpara> The affected drawable.
1046
</simpara></listitem></varlistentry>
1047
<varlistentry><term><parameter>src_drawable_ID</parameter> :</term>
1048
<listitem><simpara> The source drawable.
1049
</simpara></listitem></varlistentry>
1050
<varlistentry><term><parameter>src_x</parameter> :</term>
1051
<listitem><simpara> The x coordinate in the source image.
1052
</simpara></listitem></varlistentry>
1053
<varlistentry><term><parameter>src_y</parameter> :</term>
1054
<listitem><simpara> The y coordinate in the source image.
1055
</simpara></listitem></varlistentry>
1056
<varlistentry><term><parameter>num_strokes</parameter> :</term>
1057
<listitem><simpara> Number of stroke control points (count each coordinate as 2 points).
1058
</simpara></listitem></varlistentry>
1059
<varlistentry><term><parameter>strokes</parameter> :</term>
1060
<listitem><simpara> Array of stroke coordinates: { s1.x, s1.y, s2.x, s2.y, ..., sn.x, sn.y }.
1061
</simpara></listitem></varlistentry>
1062
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> TRUE on success.
1064
</simpara></listitem></varlistentry>
1065
</variablelist><para role="since">Since GIMP 2.4</para></refsect2>
1066
<refsect2 id="gimp-heal-default" role="function" condition="since:GIMP 2.4">
1067
<title>gimp_heal_default ()</title>
1068
<indexterm zone="gimp-heal-default" role="GIMP 2.4"><primary sortas="gimp_heal_default">gimp_heal_default</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_heal_default (<link linkend="gint32">gint32</link> drawable_ID,
1069
<link linkend="gint">gint</link> num_strokes,
1070
const <link linkend="gdouble">gdouble</link> *strokes);</programlisting>
1072
Heal from the source to the dest drawable using the current brush
1075
This tool heals from the source drawable starting at the specified
1076
source coordinates to the dest drawable. This function performs
1077
exactly the same as the <link linkend="gimp-heal"><function>gimp_heal()</function></link> function except that the tools
1078
arguments are obtained from the healing option dialog. It this
1079
dialog has not been activated then the dialogs default values will
1082
</para><variablelist role="params">
1083
<varlistentry><term><parameter>drawable_ID</parameter> :</term>
1084
<listitem><simpara> The affected drawable.
1085
</simpara></listitem></varlistentry>
1086
<varlistentry><term><parameter>num_strokes</parameter> :</term>
1087
<listitem><simpara> Number of stroke control points (count each coordinate as 2 points).
1088
</simpara></listitem></varlistentry>
1089
<varlistentry><term><parameter>strokes</parameter> :</term>
1090
<listitem><simpara> Array of stroke coordinates: { s1.x, s1.y, s2.x, s2.y, ..., sn.x, sn.y }.
1091
</simpara></listitem></varlistentry>
1092
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> TRUE on success.
1094
</simpara></listitem></varlistentry>
1095
</variablelist><para role="since">Since GIMP 2.4</para></refsect2>
1096
<refsect2 id="gimp-paintbrush" role="function">
1097
<title>gimp_paintbrush ()</title>
1098
<indexterm zone="gimp-paintbrush"><primary sortas="gimp_paintbrush">gimp_paintbrush</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_paintbrush (<link linkend="gint32">gint32</link> drawable_ID,
1099
<link linkend="gdouble">gdouble</link> fade_out,
1100
<link linkend="gint">gint</link> num_strokes,
1101
const <link linkend="gdouble">gdouble</link> *strokes,
1102
<link linkend="GimpPaintApplicationMode">GimpPaintApplicationMode</link> method,
1103
<link linkend="gdouble">gdouble</link> gradient_length);</programlisting>
1105
Paint in the current brush with optional fade out parameter and pull
1106
colors from a gradient.
1109
This tool is the standard paintbrush. It draws linearly interpolated
1110
lines through the specified stroke coordinates. It operates on the
1111
specified drawable in the foreground color with the active brush.
1112
The 'fade-out' parameter is measured in pixels and allows the brush
1113
stroke to linearly fall off. The pressure is set to the maximum at
1114
the beginning of the stroke. As the distance of the stroke nears the
1115
fade-out value, the pressure will approach zero. The gradient-length
1116
is the distance to spread the gradient over. It is measured in
1117
pixels. If the gradient-length is 0, no gradient is used.</para>
1119
</para><variablelist role="params">
1120
<varlistentry><term><parameter>drawable_ID</parameter> :</term>
1121
<listitem><simpara> The affected drawable.
1122
</simpara></listitem></varlistentry>
1123
<varlistentry><term><parameter>fade_out</parameter> :</term>
1124
<listitem><simpara> Fade out parameter.
1125
</simpara></listitem></varlistentry>
1126
<varlistentry><term><parameter>num_strokes</parameter> :</term>
1127
<listitem><simpara> Number of stroke control points (count each coordinate as 2 points).
1128
</simpara></listitem></varlistentry>
1129
<varlistentry><term><parameter>strokes</parameter> :</term>
1130
<listitem><simpara> Array of stroke coordinates: { s1.x, s1.y, s2.x, s2.y, ..., sn.x, sn.y }.
1131
</simpara></listitem></varlistentry>
1132
<varlistentry><term><parameter>method</parameter> :</term>
1133
<listitem><simpara> The paint method to use.
1134
</simpara></listitem></varlistentry>
1135
<varlistentry><term><parameter>gradient_length</parameter> :</term>
1136
<listitem><simpara> Length of gradient to draw.
1137
</simpara></listitem></varlistentry>
1138
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> TRUE on success.
1139
</simpara></listitem></varlistentry>
1140
</variablelist></refsect2>
1141
<refsect2 id="gimp-paintbrush-default" role="function">
1142
<title>gimp_paintbrush_default ()</title>
1143
<indexterm zone="gimp-paintbrush-default"><primary sortas="gimp_paintbrush_default">gimp_paintbrush_default</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_paintbrush_default (<link linkend="gint32">gint32</link> drawable_ID,
1144
<link linkend="gint">gint</link> num_strokes,
1145
const <link linkend="gdouble">gdouble</link> *strokes);</programlisting>
1147
Paint in the current brush. The fade out parameter and pull colors
1148
from a gradient parameter are set from the paintbrush options
1149
dialog. If this dialog has not been activated then the dialog
1150
defaults will be used.
1153
This tool is similar to the standard paintbrush. It draws linearly
1154
interpolated lines through the specified stroke coordinates. It
1155
operates on the specified drawable in the foreground color with the
1156
active brush. The 'fade-out' parameter is measured in pixels and
1157
allows the brush stroke to linearly fall off (value obtained from
1158
the option dialog). The pressure is set to the maximum at the
1159
beginning of the stroke. As the distance of the stroke nears the
1160
fade-out value, the pressure will approach zero. The gradient-length
1161
(value obtained from the option dialog) is the distance to spread
1162
the gradient over. It is measured in pixels. If the gradient-length
1163
is 0, no gradient is used.</para>
1165
</para><variablelist role="params">
1166
<varlistentry><term><parameter>drawable_ID</parameter> :</term>
1167
<listitem><simpara> The affected drawable.
1168
</simpara></listitem></varlistentry>
1169
<varlistentry><term><parameter>num_strokes</parameter> :</term>
1170
<listitem><simpara> Number of stroke control points (count each coordinate as 2 points).
1171
</simpara></listitem></varlistentry>
1172
<varlistentry><term><parameter>strokes</parameter> :</term>
1173
<listitem><simpara> Array of stroke coordinates: { s1.x, s1.y, s2.x, s2.y, ..., sn.x, sn.y }.
1174
</simpara></listitem></varlistentry>
1175
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> TRUE on success.
1176
</simpara></listitem></varlistentry>
1177
</variablelist></refsect2>
1178
<refsect2 id="gimp-pencil" role="function">
1179
<title>gimp_pencil ()</title>
1180
<indexterm zone="gimp-pencil"><primary sortas="gimp_pencil">gimp_pencil</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_pencil (<link linkend="gint32">gint32</link> drawable_ID,
1181
<link linkend="gint">gint</link> num_strokes,
1182
const <link linkend="gdouble">gdouble</link> *strokes);</programlisting>
1184
Paint in the current brush without sub-pixel sampling.
1187
This tool is the standard pencil. It draws linearly interpolated
1188
lines through the specified stroke coordinates. It operates on the
1189
specified drawable in the foreground color with the active brush.
1190
The brush mask is treated as though it contains only black and white
1191
values. Any value below half is treated as black; any above half, as
1194
</para><variablelist role="params">
1195
<varlistentry><term><parameter>drawable_ID</parameter> :</term>
1196
<listitem><simpara> The affected drawable.
1197
</simpara></listitem></varlistentry>
1198
<varlistentry><term><parameter>num_strokes</parameter> :</term>
1199
<listitem><simpara> Number of stroke control points (count each coordinate as 2 points).
1200
</simpara></listitem></varlistentry>
1201
<varlistentry><term><parameter>strokes</parameter> :</term>
1202
<listitem><simpara> Array of stroke coordinates: { s1.x, s1.y, s2.x, s2.y, ..., sn.x, sn.y }.
1203
</simpara></listitem></varlistentry>
1204
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> TRUE on success.
1205
</simpara></listitem></varlistentry>
1206
</variablelist></refsect2>
1207
<refsect2 id="gimp-perspective" role="function" condition="deprecated:">
1208
<title>gimp_perspective ()</title>
1209
<indexterm zone="gimp-perspective" role="deprecated"><primary sortas="gimp_perspective">gimp_perspective</primary></indexterm><programlisting><link linkend="gint32">gint32</link> gimp_perspective (<link linkend="gint32">gint32</link> drawable_ID,
1210
<link linkend="gboolean">gboolean</link> interpolation,
1211
<link linkend="gdouble">gdouble</link> x0,
1212
<link linkend="gdouble">gdouble</link> y0,
1213
<link linkend="gdouble">gdouble</link> x1,
1214
<link linkend="gdouble">gdouble</link> y1,
1215
<link linkend="gdouble">gdouble</link> x2,
1216
<link linkend="gdouble">gdouble</link> y2,
1217
<link linkend="gdouble">gdouble</link> x3,
1218
<link linkend="gdouble">gdouble</link> y3);</programlisting>
1219
<warning><para><literal>gimp_perspective</literal> is deprecated and should not be used in newly-written code.</para></warning>
1221
This procedure is deprecated! Use
1222
<link linkend="gimp-drawable-transform-perspective-default"><function>gimp_drawable_transform_perspective_default()</function></link> instead.</para>
1224
</para><variablelist role="params">
1225
<varlistentry><term><parameter>drawable_ID</parameter> :</term>
1226
<listitem><simpara> The affected drawable.
1227
</simpara></listitem></varlistentry>
1228
<varlistentry><term><parameter>interpolation</parameter> :</term>
1229
<listitem><simpara> Whether to use interpolation.
1230
</simpara></listitem></varlistentry>
1231
<varlistentry><term><parameter>x0</parameter> :</term>
1232
<listitem><simpara> The new x coordinate of upper-left corner of original bounding box.
1233
</simpara></listitem></varlistentry>
1234
<varlistentry><term><parameter>y0</parameter> :</term>
1235
<listitem><simpara> The new y coordinate of upper-left corner of original bounding box.
1236
</simpara></listitem></varlistentry>
1237
<varlistentry><term><parameter>x1</parameter> :</term>
1238
<listitem><simpara> The new x coordinate of upper-right corner of original bounding box.
1239
</simpara></listitem></varlistentry>
1240
<varlistentry><term><parameter>y1</parameter> :</term>
1241
<listitem><simpara> The new y coordinate of upper-right corner of original bounding box.
1242
</simpara></listitem></varlistentry>
1243
<varlistentry><term><parameter>x2</parameter> :</term>
1244
<listitem><simpara> The new x coordinate of lower-left corner of original bounding box.
1245
</simpara></listitem></varlistentry>
1246
<varlistentry><term><parameter>y2</parameter> :</term>
1247
<listitem><simpara> The new y coordinate of lower-left corner of original bounding box.
1248
</simpara></listitem></varlistentry>
1249
<varlistentry><term><parameter>x3</parameter> :</term>
1250
<listitem><simpara> The new x coordinate of lower-right corner of original bounding box.
1251
</simpara></listitem></varlistentry>
1252
<varlistentry><term><parameter>y3</parameter> :</term>
1253
<listitem><simpara> The new y coordinate of lower-right corner of original bounding box.
1254
</simpara></listitem></varlistentry>
1255
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> The newly mapped drawable.
1256
</simpara></listitem></varlistentry>
1257
</variablelist></refsect2>
1258
<refsect2 id="gimp-rect-select" role="function">
1259
<title>gimp_rect_select ()</title>
1260
<indexterm zone="gimp-rect-select"><primary sortas="gimp_rect_select">gimp_rect_select</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_rect_select (<link linkend="gint32">gint32</link> image_ID,
1261
<link linkend="gdouble">gdouble</link> x,
1262
<link linkend="gdouble">gdouble</link> y,
1263
<link linkend="gdouble">gdouble</link> width,
1264
<link linkend="gdouble">gdouble</link> height,
1265
<link linkend="GimpChannelOps">GimpChannelOps</link> operation,
1266
<link linkend="gboolean">gboolean</link> feather,
1267
<link linkend="gdouble">gdouble</link> feather_radius);</programlisting>
1269
Create a rectangular selection over the specified image;
1272
This tool creates a rectangular selection over the specified image.
1273
The rectangular region can be either added to, subtracted from, or
1274
replace the contents of the previous selection mask. If the feather
1275
option is enabled, the resulting selection is blurred before
1276
combining. The blur is a gaussian blur with the specified feather
1279
</para><variablelist role="params">
1280
<varlistentry><term><parameter>image_ID</parameter> :</term>
1281
<listitem><simpara> The image.
1282
</simpara></listitem></varlistentry>
1283
<varlistentry><term><parameter>x</parameter> :</term>
1284
<listitem><simpara> x coordinate of upper-left corner of rectangle.
1285
</simpara></listitem></varlistentry>
1286
<varlistentry><term><parameter>y</parameter> :</term>
1287
<listitem><simpara> y coordinate of upper-left corner of rectangle.
1288
</simpara></listitem></varlistentry>
1289
<varlistentry><term><parameter>width</parameter> :</term>
1290
<listitem><simpara> The width of the rectangle.
1291
</simpara></listitem></varlistentry>
1292
<varlistentry><term><parameter>height</parameter> :</term>
1293
<listitem><simpara> The height of the rectangle.
1294
</simpara></listitem></varlistentry>
1295
<varlistentry><term><parameter>operation</parameter> :</term>
1296
<listitem><simpara> The selection operation.
1297
</simpara></listitem></varlistentry>
1298
<varlistentry><term><parameter>feather</parameter> :</term>
1299
<listitem><simpara> Feather option for selections.
1300
</simpara></listitem></varlistentry>
1301
<varlistentry><term><parameter>feather_radius</parameter> :</term>
1302
<listitem><simpara> Radius for feather operation.
1303
</simpara></listitem></varlistentry>
1304
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> TRUE on success.
1305
</simpara></listitem></varlistentry>
1306
</variablelist></refsect2>
1307
<refsect2 id="gimp-round-rect-select" role="function" condition="since:GIMP 2.4">
1308
<title>gimp_round_rect_select ()</title>
1309
<indexterm zone="gimp-round-rect-select" role="GIMP 2.4"><primary sortas="gimp_round_rect_select">gimp_round_rect_select</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_round_rect_select (<link linkend="gint32">gint32</link> image_ID,
1310
<link linkend="gdouble">gdouble</link> x,
1311
<link linkend="gdouble">gdouble</link> y,
1312
<link linkend="gdouble">gdouble</link> width,
1313
<link linkend="gdouble">gdouble</link> height,
1314
<link linkend="gdouble">gdouble</link> corner_radius_x,
1315
<link linkend="gdouble">gdouble</link> corner_radius_y,
1316
<link linkend="GimpChannelOps">GimpChannelOps</link> operation,
1317
<link linkend="gboolean">gboolean</link> antialias,
1318
<link linkend="gboolean">gboolean</link> feather,
1319
<link linkend="gdouble">gdouble</link> feather_radius_x,
1320
<link linkend="gdouble">gdouble</link> feather_radius_y);</programlisting>
1322
Create a rectangular selection with round corners over the specified
1326
This tool creates a rectangular selection with round corners over
1327
the specified image. The rectangular region can be either added to,
1328
subtracted from, or replace the contents of the previous selection
1329
mask. If the feather option is enabled, the resulting selection is
1330
blurred before combining. The blur is a gaussian blur with the
1331
specified feather radius.</para>
1333
</para><variablelist role="params">
1334
<varlistentry><term><parameter>image_ID</parameter> :</term>
1335
<listitem><simpara> The image.
1336
</simpara></listitem></varlistentry>
1337
<varlistentry><term><parameter>x</parameter> :</term>
1338
<listitem><simpara> x coordinate of upper-left corner of rectangle.
1339
</simpara></listitem></varlistentry>
1340
<varlistentry><term><parameter>y</parameter> :</term>
1341
<listitem><simpara> y coordinate of upper-left corner of rectangle.
1342
</simpara></listitem></varlistentry>
1343
<varlistentry><term><parameter>width</parameter> :</term>
1344
<listitem><simpara> The width of the rectangle.
1345
</simpara></listitem></varlistentry>
1346
<varlistentry><term><parameter>height</parameter> :</term>
1347
<listitem><simpara> The height of the rectangle.
1348
</simpara></listitem></varlistentry>
1349
<varlistentry><term><parameter>corner_radius_x</parameter> :</term>
1350
<listitem><simpara> The corner radius in X direction.
1351
</simpara></listitem></varlistentry>
1352
<varlistentry><term><parameter>corner_radius_y</parameter> :</term>
1353
<listitem><simpara> The corner radius in Y direction.
1354
</simpara></listitem></varlistentry>
1355
<varlistentry><term><parameter>operation</parameter> :</term>
1356
<listitem><simpara> The selection operation.
1357
</simpara></listitem></varlistentry>
1358
<varlistentry><term><parameter>antialias</parameter> :</term>
1359
<listitem><simpara> Antialiasing.
1360
</simpara></listitem></varlistentry>
1361
<varlistentry><term><parameter>feather</parameter> :</term>
1362
<listitem><simpara> Feather option for selections.
1363
</simpara></listitem></varlistentry>
1364
<varlistentry><term><parameter>feather_radius_x</parameter> :</term>
1365
<listitem><simpara> Radius for feather operation in X direction.
1366
</simpara></listitem></varlistentry>
1367
<varlistentry><term><parameter>feather_radius_y</parameter> :</term>
1368
<listitem><simpara> Radius for feather operation in Y direction.
1369
</simpara></listitem></varlistentry>
1370
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> TRUE on success.
1372
</simpara></listitem></varlistentry>
1373
</variablelist><para role="since">Since GIMP 2.4</para></refsect2>
1374
<refsect2 id="gimp-rotate" role="function" condition="deprecated:">
1375
<title>gimp_rotate ()</title>
1376
<indexterm zone="gimp-rotate" role="deprecated"><primary sortas="gimp_rotate">gimp_rotate</primary></indexterm><programlisting><link linkend="gint32">gint32</link> gimp_rotate (<link linkend="gint32">gint32</link> drawable_ID,
1377
<link linkend="gboolean">gboolean</link> interpolation,
1378
<link linkend="gdouble">gdouble</link> angle);</programlisting>
1379
<warning><para><literal>gimp_rotate</literal> is deprecated and should not be used in newly-written code.</para></warning>
1381
This procedure is deprecated! Use
1382
<link linkend="gimp-drawable-transform-rotate-default"><function>gimp_drawable_transform_rotate_default()</function></link> instead.</para>
1384
</para><variablelist role="params">
1385
<varlistentry><term><parameter>drawable_ID</parameter> :</term>
1386
<listitem><simpara> The affected drawable.
1387
</simpara></listitem></varlistentry>
1388
<varlistentry><term><parameter>interpolation</parameter> :</term>
1389
<listitem><simpara> Whether to use interpolation.
1390
</simpara></listitem></varlistentry>
1391
<varlistentry><term><parameter>angle</parameter> :</term>
1392
<listitem><simpara> The angle of rotation (radians).
1393
</simpara></listitem></varlistentry>
1394
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> The rotated drawable.
1395
</simpara></listitem></varlistentry>
1396
</variablelist></refsect2>
1397
<refsect2 id="gimp-scale" role="function" condition="deprecated:">
1398
<title>gimp_scale ()</title>
1399
<indexterm zone="gimp-scale" role="deprecated"><primary sortas="gimp_scale">gimp_scale</primary></indexterm><programlisting><link linkend="gint32">gint32</link> gimp_scale (<link linkend="gint32">gint32</link> drawable_ID,
1400
<link linkend="gboolean">gboolean</link> interpolation,
1401
<link linkend="gdouble">gdouble</link> x0,
1402
<link linkend="gdouble">gdouble</link> y0,
1403
<link linkend="gdouble">gdouble</link> x1,
1404
<link linkend="gdouble">gdouble</link> y1);</programlisting>
1405
<warning><para><literal>gimp_scale</literal> is deprecated and should not be used in newly-written code.</para></warning>
1407
This procedure is deprecated! Use
1408
<link linkend="gimp-drawable-transform-scale-default"><function>gimp_drawable_transform_scale_default()</function></link> instead.</para>
1410
</para><variablelist role="params">
1411
<varlistentry><term><parameter>drawable_ID</parameter> :</term>
1412
<listitem><simpara> The affected drawable.
1413
</simpara></listitem></varlistentry>
1414
<varlistentry><term><parameter>interpolation</parameter> :</term>
1415
<listitem><simpara> Whether to use interpolation.
1416
</simpara></listitem></varlistentry>
1417
<varlistentry><term><parameter>x0</parameter> :</term>
1418
<listitem><simpara> The new x coordinate of the upper-left corner of the scaled region.
1419
</simpara></listitem></varlistentry>
1420
<varlistentry><term><parameter>y0</parameter> :</term>
1421
<listitem><simpara> The new y coordinate of the upper-left corner of the scaled region.
1422
</simpara></listitem></varlistentry>
1423
<varlistentry><term><parameter>x1</parameter> :</term>
1424
<listitem><simpara> The new x coordinate of the lower-right corner of the scaled region.
1425
</simpara></listitem></varlistentry>
1426
<varlistentry><term><parameter>y1</parameter> :</term>
1427
<listitem><simpara> The new y coordinate of the lower-right corner of the scaled region.
1428
</simpara></listitem></varlistentry>
1429
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> The scaled drawable.
1430
</simpara></listitem></varlistentry>
1431
</variablelist></refsect2>
1432
<refsect2 id="gimp-shear" role="function" condition="deprecated:">
1433
<title>gimp_shear ()</title>
1434
<indexterm zone="gimp-shear" role="deprecated"><primary sortas="gimp_shear">gimp_shear</primary></indexterm><programlisting><link linkend="gint32">gint32</link> gimp_shear (<link linkend="gint32">gint32</link> drawable_ID,
1435
<link linkend="gboolean">gboolean</link> interpolation,
1436
<link linkend="GimpOrientationType">GimpOrientationType</link> shear_type,
1437
<link linkend="gdouble">gdouble</link> magnitude);</programlisting>
1438
<warning><para><literal>gimp_shear</literal> is deprecated and should not be used in newly-written code.</para></warning>
1440
This procedure is deprecated! Use
1441
<link linkend="gimp-drawable-transform-shear-default"><function>gimp_drawable_transform_shear_default()</function></link> instead.</para>
1443
</para><variablelist role="params">
1444
<varlistentry><term><parameter>drawable_ID</parameter> :</term>
1445
<listitem><simpara> The affected drawable.
1446
</simpara></listitem></varlistentry>
1447
<varlistentry><term><parameter>interpolation</parameter> :</term>
1448
<listitem><simpara> Whether to use interpolation.
1449
</simpara></listitem></varlistentry>
1450
<varlistentry><term><parameter>shear_type</parameter> :</term>
1451
<listitem><simpara> Type of shear.
1452
</simpara></listitem></varlistentry>
1453
<varlistentry><term><parameter>magnitude</parameter> :</term>
1454
<listitem><simpara> The magnitude of the shear.
1455
</simpara></listitem></varlistentry>
1456
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> The sheared drawable.
1457
</simpara></listitem></varlistentry>
1458
</variablelist></refsect2>
1459
<refsect2 id="gimp-smudge" role="function">
1460
<title>gimp_smudge ()</title>
1461
<indexterm zone="gimp-smudge"><primary sortas="gimp_smudge">gimp_smudge</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_smudge (<link linkend="gint32">gint32</link> drawable_ID,
1462
<link linkend="gdouble">gdouble</link> pressure,
1463
<link linkend="gint">gint</link> num_strokes,
1464
const <link linkend="gdouble">gdouble</link> *strokes);</programlisting>
1466
Smudge image with varying pressure.
1469
This tool simulates a smudge using the current brush. High pressure
1470
results in a greater smudge of paint while low pressure results in a
1471
lesser smudge.</para>
1473
</para><variablelist role="params">
1474
<varlistentry><term><parameter>drawable_ID</parameter> :</term>
1475
<listitem><simpara> The affected drawable.
1476
</simpara></listitem></varlistentry>
1477
<varlistentry><term><parameter>pressure</parameter> :</term>
1478
<listitem><simpara> The pressure of the smudge strokes.
1479
</simpara></listitem></varlistentry>
1480
<varlistentry><term><parameter>num_strokes</parameter> :</term>
1481
<listitem><simpara> Number of stroke control points (count each coordinate as 2 points).
1482
</simpara></listitem></varlistentry>
1483
<varlistentry><term><parameter>strokes</parameter> :</term>
1484
<listitem><simpara> Array of stroke coordinates: { s1.x, s1.y, s2.x, s2.y, ..., sn.x, sn.y }.
1485
</simpara></listitem></varlistentry>
1486
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> TRUE on success.
1487
</simpara></listitem></varlistentry>
1488
</variablelist></refsect2>
1489
<refsect2 id="gimp-smudge-default" role="function">
1490
<title>gimp_smudge_default ()</title>
1491
<indexterm zone="gimp-smudge-default"><primary sortas="gimp_smudge_default">gimp_smudge_default</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_smudge_default (<link linkend="gint32">gint32</link> drawable_ID,
1492
<link linkend="gint">gint</link> num_strokes,
1493
const <link linkend="gdouble">gdouble</link> *strokes);</programlisting>
1495
Smudge image with varying pressure.
1498
This tool simulates a smudge using the current brush. It behaves
1499
exactly the same as <link linkend="gimp-smudge"><function>gimp_smudge()</function></link> except that the pressure value is
1500
taken from the smudge tool options or the options default if the
1501
tools option dialog has not been activated.</para>
1503
</para><variablelist role="params">
1504
<varlistentry><term><parameter>drawable_ID</parameter> :</term>
1505
<listitem><simpara> The affected drawable.
1506
</simpara></listitem></varlistentry>
1507
<varlistentry><term><parameter>num_strokes</parameter> :</term>
1508
<listitem><simpara> Number of stroke control points (count each coordinate as 2 points).
1509
</simpara></listitem></varlistentry>
1510
<varlistentry><term><parameter>strokes</parameter> :</term>
1511
<listitem><simpara> Array of stroke coordinates: { s1.x, s1.y, s2.x, s2.y, ..., sn.x, sn.y }.
1512
</simpara></listitem></varlistentry>
1513
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> TRUE on success.
1514
</simpara></listitem></varlistentry>
1515
</variablelist></refsect2>
1516
<refsect2 id="gimp-transform-2d" role="function" condition="deprecated:">
1517
<title>gimp_transform_2d ()</title>
1518
<indexterm zone="gimp-transform-2d" role="deprecated"><primary sortas="gimp_transform_2d">gimp_transform_2d</primary></indexterm><programlisting><link linkend="gint32">gint32</link> gimp_transform_2d (<link linkend="gint32">gint32</link> drawable_ID,
1519
<link linkend="gboolean">gboolean</link> interpolation,
1520
<link linkend="gdouble">gdouble</link> source_x,
1521
<link linkend="gdouble">gdouble</link> source_y,
1522
<link linkend="gdouble">gdouble</link> scale_x,
1523
<link linkend="gdouble">gdouble</link> scale_y,
1524
<link linkend="gdouble">gdouble</link> angle,
1525
<link linkend="gdouble">gdouble</link> dest_x,
1526
<link linkend="gdouble">gdouble</link> dest_y);</programlisting>
1527
<warning><para><literal>gimp_transform_2d</literal> is deprecated and should not be used in newly-written code.</para></warning>
1529
This procedure is deprecated! Use
1530
<link linkend="gimp-drawable-transform-2d-default"><function>gimp_drawable_transform_2d_default()</function></link> instead.</para>
1532
</para><variablelist role="params">
1533
<varlistentry><term><parameter>drawable_ID</parameter> :</term>
1534
<listitem><simpara> The affected drawable.
1535
</simpara></listitem></varlistentry>
1536
<varlistentry><term><parameter>interpolation</parameter> :</term>
1537
<listitem><simpara> Whether to use interpolation.
1538
</simpara></listitem></varlistentry>
1539
<varlistentry><term><parameter>source_x</parameter> :</term>
1540
<listitem><simpara> X coordinate of the transformation center.
1541
</simpara></listitem></varlistentry>
1542
<varlistentry><term><parameter>source_y</parameter> :</term>
1543
<listitem><simpara> Y coordinate of the transformation center.
1544
</simpara></listitem></varlistentry>
1545
<varlistentry><term><parameter>scale_x</parameter> :</term>
1546
<listitem><simpara> Amount to scale in x direction.
1547
</simpara></listitem></varlistentry>
1548
<varlistentry><term><parameter>scale_y</parameter> :</term>
1549
<listitem><simpara> Amount to scale in y direction.
1550
</simpara></listitem></varlistentry>
1551
<varlistentry><term><parameter>angle</parameter> :</term>
1552
<listitem><simpara> The angle of rotation (radians).
1553
</simpara></listitem></varlistentry>
1554
<varlistentry><term><parameter>dest_x</parameter> :</term>
1555
<listitem><simpara> X coordinate of where the centre goes.
1556
</simpara></listitem></varlistentry>
1557
<varlistentry><term><parameter>dest_y</parameter> :</term>
1558
<listitem><simpara> Y coordinate of where the centre goes.
1559
</simpara></listitem></varlistentry>
1560
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> The transformed drawable.
1561
</simpara></listitem></varlistentry>
1562
</variablelist></refsect2>