4
4
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
5
5
<title>gimpselection</title>
6
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
6
<meta name="generator" content="DocBook XSL Stylesheets V1.72.0">
7
7
<link rel="start" href="index.html" title="GIMP Library Reference Manual">
8
<link rel="up" href="libgimp-image.html" title="Manupulating Images and all their Properties">
8
<link rel="up" href="libgimp-image.html" title="Manupulating Images and their Properties">
9
9
<link rel="prev" href="libgimp-gimpregioniterator.html" title="gimpregioniterator">
10
10
<link rel="next" href="libgimp-gimptexttool.html" title="gimptexttool">
11
<meta name="generator" content="GTK-Doc V1.7 (XML mode)">
11
<meta name="generator" content="GTK-Doc V1.8 (XML mode)">
12
12
<link rel="stylesheet" href="style.css" type="text/css">
13
<link rel="part" href="gimpdefinitions.html" title="Part I. GIMP Constants">
14
<link rel="part" href="libgimp.html" title="Part II. GIMP Library">
13
<link rel="part" href="libgimp.html" title="Part I. GIMP Library">
15
14
<link rel="chapter" href="libgimp-general.html" title="Functions not Related to Specific Images">
16
<link rel="chapter" href="libgimp-image.html" title="Manupulating Images and all their Properties">
15
<link rel="chapter" href="libgimp-image.html" title="Manupulating Images and their Properties">
17
16
<link rel="chapter" href="libgimp-data.html" title="Data Objects">
18
17
<link rel="chapter" href="libgimp-selectors.html" title="Controlling the Core's Selection Dialogs">
19
<link rel="part" href="libgimpui.html" title="Part III. GIMP User Interface Library">
18
<link rel="part" href="libgimpui.html" title="Part II. GIMP User Interface Library">
20
19
<link rel="chapter" href="libgimpui-hierarchy.html" title="Object Hierarchy">
20
<link rel="index" href="libgimp-index.html" title="Index">
21
<link rel="index" href="libgimp-index-new-in-2-2.html" title="Index of new symbols in GIMP 2.2">
22
<link rel="index" href="libgimp-index-new-in-2-4.html" title="Index of new symbols in GIMP 2.4">
23
<link rel="index" href="libgimp-index-deprecated.html" title="Index of deprecated symbols">
22
25
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
23
26
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
28
31
<th width="100%" align="center">GIMP Library Reference Manual</th>
29
32
<td><a accesskey="n" href="libgimp-gimptexttool.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
31
<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2566315" class="shortcut">Top</a>
34
<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2594198" class="shortcut">Top</a>
33
<a href="#id2619523" class="shortcut">Description</a></nobr></td></tr>
36
<a href="#id2660756" class="shortcut">Description</a></nobr></td></tr>
35
38
<div class="refentry" lang="en">
36
39
<a name="libgimp-gimpselection"></a><div class="titlepage"></div>
37
40
<div class="refnamediv"><table width="100%"><tr>
40
<a name="id2566315"></a><span class="refentrytitle">gimpselection</span>
43
<a name="id2594198"></a><span class="refentrytitle">gimpselection</span>
42
45
<p>gimpselection — Functions for manipulating selections.</p>
52
gboolean <a href="libgimp-gimpselection.html#gimp-selection-bounds">gimp_selection_bounds</a> (gint32 image_ID,
58
gboolean <a href="libgimp-gimpselection.html#gimp-selection-all">gimp_selection_all</a> (gint32 image_ID);
59
gboolean <a href="libgimp-gimpselection.html#gimp-selection-none">gimp_selection_none</a> (gint32 image_ID);
60
gboolean <a href="libgimp-gimpselection.html#gimp-selection-clear">gimp_selection_clear</a> (gint32 image_ID);
61
gboolean <a href="libgimp-gimpselection.html#gimp-selection-is-empty">gimp_selection_is_empty</a> (gint32 image_ID);
62
gint32 <a href="libgimp-gimpselection.html#gimp-selection-float">gimp_selection_float</a> (gint32 image_ID,
66
gboolean <a href="libgimp-gimpselection.html#gimp-selection-load">gimp_selection_load</a> (gint32 channel_ID);
67
gint32 <a href="libgimp-gimpselection.html#gimp-selection-save">gimp_selection_save</a> (gint32 image_ID);
68
gint <a href="libgimp-gimpselection.html#gimp-selection-value">gimp_selection_value</a> (gint32 image_ID,
71
gboolean <a href="libgimp-gimpselection.html#gimp-selection-grow">gimp_selection_grow</a> (gint32 image_ID,
73
gboolean <a href="libgimp-gimpselection.html#gimp-selection-shrink">gimp_selection_shrink</a> (gint32 image_ID,
75
gboolean <a href="libgimp-gimpselection.html#gimp-selection-invert">gimp_selection_invert</a> (gint32 image_ID);
76
gboolean <a href="libgimp-gimpselection.html#gimp-selection-feather">gimp_selection_feather</a> (gint32 image_ID,
78
gboolean <a href="libgimp-gimpselection.html#gimp-selection-sharpen">gimp_selection_sharpen</a> (gint32 image_ID);
79
gboolean <a href="libgimp-gimpselection.html#gimp-selection-border">gimp_selection_border</a> (gint32 image_ID,
81
gboolean <a href="libgimp-gimpselection.html#gimp-selection-translate">gimp_selection_translate</a> (gint32 image_ID,
84
gboolean <a href="libgimp-gimpselection.html#gimp-selection-layer-alpha">gimp_selection_layer_alpha</a> (gint32 layer_ID);
85
gboolean <a href="libgimp-gimpselection.html#gimp-selection-combine">gimp_selection_combine</a> (gint32 channel_ID,
86
<a href="libgimp-gimpenums.html#GimpChannelOps">GimpChannelOps</a> operation);
55
gboolean <a href="libgimp-gimpselection.html#gimp-selection-bounds">gimp_selection_bounds</a> (gint32 image_ID,
61
gboolean <a href="libgimp-gimpselection.html#gimp-selection-all">gimp_selection_all</a> (gint32 image_ID);
62
gboolean <a href="libgimp-gimpselection.html#gimp-selection-none">gimp_selection_none</a> (gint32 image_ID);
63
gboolean <a href="libgimp-gimpselection.html#gimp-selection-clear">gimp_selection_clear</a> (gint32 image_ID);
64
gboolean <a href="libgimp-gimpselection.html#gimp-selection-is-empty">gimp_selection_is_empty</a> (gint32 image_ID);
65
gint32 <a href="libgimp-gimpselection.html#gimp-selection-float">gimp_selection_float</a> (gint32 image_ID,
69
gboolean <a href="libgimp-gimpselection.html#gimp-selection-load">gimp_selection_load</a> (gint32 channel_ID);
70
gint32 <a href="libgimp-gimpselection.html#gimp-selection-save">gimp_selection_save</a> (gint32 image_ID);
71
gint <a href="libgimp-gimpselection.html#gimp-selection-value">gimp_selection_value</a> (gint32 image_ID,
74
gboolean <a href="libgimp-gimpselection.html#gimp-selection-grow">gimp_selection_grow</a> (gint32 image_ID,
76
gboolean <a href="libgimp-gimpselection.html#gimp-selection-shrink">gimp_selection_shrink</a> (gint32 image_ID,
78
gboolean <a href="libgimp-gimpselection.html#gimp-selection-invert">gimp_selection_invert</a> (gint32 image_ID);
79
gboolean <a href="libgimp-gimpselection.html#gimp-selection-feather">gimp_selection_feather</a> (gint32 image_ID,
81
gboolean <a href="libgimp-gimpselection.html#gimp-selection-sharpen">gimp_selection_sharpen</a> (gint32 image_ID);
82
gboolean <a href="libgimp-gimpselection.html#gimp-selection-border">gimp_selection_border</a> (gint32 image_ID,
84
gboolean <a href="libgimp-gimpselection.html#gimp-selection-translate">gimp_selection_translate</a> (gint32 image_ID,
87
gboolean <a href="libgimp-gimpselection.html#gimp-selection-layer-alpha">gimp_selection_layer_alpha</a> (gint32 layer_ID);
88
gboolean <a href="libgimp-gimpselection.html#gimp-selection-combine">gimp_selection_combine</a> (gint32 channel_ID,
90
href="../libgimpbase/libgimpbase-gimpbaseenums.html#GimpChannelOps"
91
>GimpChannelOps</a> operation);
89
94
<div class="refsect1" lang="en">
90
<a name="id2619523"></a><h2>Description</h2>
95
<a name="id2660756"></a><h2>Description</h2>
92
97
Functions for manipulating selections.
96
101
<div class="refsect1" lang="en">
97
<a name="id2619539"></a><h2>Details</h2>
102
<a name="id2660772"></a><h2>Details</h2>
98
103
<div class="refsect2" lang="en">
99
<a name="id2619549"></a><h3>
104
<a name="id2660782"></a><h3>
100
105
<a name="gimp-selection-bounds"></a>gimp_selection_bounds ()</h3>
101
<a class="indexterm" name="id2619561"></a><pre class="programlisting">gboolean gimp_selection_bounds (gint32 image_ID,
106
<a class="indexterm" name="id2664489"></a><pre class="programlisting">gboolean gimp_selection_bounds (gint32 image_ID,
108
113
Find the bounding box of the current selection.
123
128
<col align="left" valign="top">
127
<span class="term"><em class="parameter"><code>image_ID</code></em> :</span></td>
131
<td><span class="term"><em class="parameter"><code>image_ID</code></em> :</span></td>
133
<span class="term"><em class="parameter"><code>non_empty</code></em> :</span></td>
134
<td> True if there is a selection.
136
<td><span class="term"><em class="parameter"><code>non_empty</code></em> :</span></td>
137
<td> TRUE if there is a selection.
139
<span class="term"><em class="parameter"><code>x1</code></em> :</span></td>
141
<td><span class="term"><em class="parameter"><code>x1</code></em> :</span></td>
140
142
<td> x coordinate of upper left corner of selection bounds.
145
<span class="term"><em class="parameter"><code>y1</code></em> :</span></td>
146
<td><span class="term"><em class="parameter"><code>y1</code></em> :</span></td>
146
147
<td> y coordinate of upper left corner of selection bounds.
151
<span class="term"><em class="parameter"><code>x2</code></em> :</span></td>
151
<td><span class="term"><em class="parameter"><code>x2</code></em> :</span></td>
152
152
<td> x coordinate of lower right corner of selection bounds.
157
<span class="term"><em class="parameter"><code>y2</code></em> :</span></td>
156
<td><span class="term"><em class="parameter"><code>y2</code></em> :</span></td>
158
157
<td> y coordinate of lower right corner of selection bounds.
163
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
161
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
164
162
<td> TRUE on success.
320
310
<col align="left" valign="top">
324
<span class="term"><em class="parameter"><code>image_ID</code></em> :</span></td>
313
<td><span class="term"><em class="parameter"><code>image_ID</code></em> :</span></td>
330
<span class="term"><em class="parameter"><code>drawable_ID</code></em> :</span></td>
318
<td><span class="term"><em class="parameter"><code>drawable_ID</code></em> :</span></td>
331
319
<td> The drawable from which to float selection.
336
<span class="term"><em class="parameter"><code>offx</code></em> :</span></td>
323
<td><span class="term"><em class="parameter"><code>offx</code></em> :</span></td>
337
324
<td> x offset for translation.
342
<span class="term"><em class="parameter"><code>offy</code></em> :</span></td>
328
<td><span class="term"><em class="parameter"><code>offy</code></em> :</span></td>
343
329
<td> y offset for translation.
348
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
333
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
349
334
<td> The floated layer.
436
417
<col align="left" valign="top">
440
<span class="term"><em class="parameter"><code>image_ID</code></em> :</span></td>
420
<td><span class="term"><em class="parameter"><code>image_ID</code></em> :</span></td>
446
<span class="term"><em class="parameter"><code>x</code></em> :</span></td>
425
<td><span class="term"><em class="parameter"><code>x</code></em> :</span></td>
447
426
<td> x coordinate of value.
452
<span class="term"><em class="parameter"><code>y</code></em> :</span></td>
430
<td><span class="term"><em class="parameter"><code>y</code></em> :</span></td>
453
431
<td> y coordinate of value.
458
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
435
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
459
436
<td> Value of the selection.
545
516
<div class="refsect2" lang="en">
546
<a name="id2624762"></a><h3>
517
<a name="id2666915"></a><h3>
547
518
<a name="gimp-selection-invert"></a>gimp_selection_invert ()</h3>
548
<a class="indexterm" name="id2624773"></a><pre class="programlisting">gboolean gimp_selection_invert (gint32 image_ID);</pre>
519
<a class="indexterm" name="id2666925"></a><pre class="programlisting">gboolean gimp_selection_invert (gint32 image_ID);</pre>
550
521
Invert the selection mask.
553
524
This procedure inverts the selection mask. For every pixel in the
554
selection channel, its new value is calculated as (255 - old_value).</p>
525
selection channel, its new value is calculated as (255 - old-value).</p>
616
582
<div class="refsect2" lang="en">
617
<a name="id2624936"></a><h3>
583
<a name="id2667072"></a><h3>
618
584
<a name="gimp-selection-sharpen"></a>gimp_selection_sharpen ()</h3>
619
<a class="indexterm" name="id2624947"></a><pre class="programlisting">gboolean gimp_selection_sharpen (gint32 image_ID);</pre>
585
<a class="indexterm" name="id2667082"></a><pre class="programlisting">gboolean gimp_selection_sharpen (gint32 image_ID);</pre>
621
587
Sharpen the selection mask.
624
590
This procedure sharpens the selection mask. For every pixel in the
625
selection channel, if the value is > 0, the new pixel is assigned
626
a value of 255. This removes any \"anti-aliasing\" that might exist
627
in the selection mask's boundary.</p>
591
selection channel, if the value is > 127, the new pixel is
592
assigned a value of 255. This removes any \"anti-aliasing\" that
593
might exist in the selection mask's boundary.</p>
709
670
<col align="left" valign="top">
713
<span class="term"><em class="parameter"><code>image_ID</code></em> :</span></td>
673
<td><span class="term"><em class="parameter"><code>image_ID</code></em> :</span></td>
719
<span class="term"><em class="parameter"><code>offx</code></em> :</span></td>
678
<td><span class="term"><em class="parameter"><code>offx</code></em> :</span></td>
720
679
<td> x offset for translation.
725
<span class="term"><em class="parameter"><code>offy</code></em> :</span></td>
683
<td><span class="term"><em class="parameter"><code>offy</code></em> :</span></td>
726
684
<td> y offset for translation.
731
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
688
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
732
689
<td> TRUE on success.
775
730
<div class="refsect2" lang="en">
776
<a name="id2625317"></a><h3>
731
<a name="id2667418"></a><h3>
777
732
<a name="gimp-selection-combine"></a>gimp_selection_combine ()</h3>
778
<a class="indexterm" name="id2625328"></a><pre class="programlisting">gboolean gimp_selection_combine (gint32 channel_ID,
779
<a href="libgimp-gimpenums.html#GimpChannelOps">GimpChannelOps</a> operation);</pre>
733
<a class="indexterm" name="id2667429"></a><pre class="programlisting">gboolean gimp_selection_combine (gint32 channel_ID,
735
href="../libgimpbase/libgimpbase-gimpbaseenums.html#GimpChannelOps"
736
>GimpChannelOps</a> operation);</pre>
781
738
Combines the specified channel with the selection mask.