~ubuntu-branches/ubuntu/hoary/gimp/hoary

« back to all changes in this revision

Viewing changes to devel-docs/libgimp/html/libgimp-gimplayer.html

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2005-04-04 14:51:23 UTC
  • Revision ID: james.westby@ubuntu.com-20050404145123-9py049eeelfymur8
Tags: upstream-2.2.2
Import upstream version 2.2.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>gimplayer</title><meta name="generator" content="DocBook XSL Stylesheets V1.66.1"><link rel="start" href="index.html" title="GIMP Library Reference Manual"><link rel="up" href="libgimp-image.html" title="Manupulating Images and all their Properties"><link rel="prev" href="libgimp-gimpimage.html" title="gimpimage"><link rel="next" href="libgimp-gimppaths.html" title="gimppaths"><meta name="generator" content="GTK-Doc V1.2 (XML mode)"><style type="text/css">
 
2
        .synopsis, .classsynopsis {
 
3
            background: #eeeeee;
 
4
            border: solid 1px #aaaaaa;
 
5
            padding: 0.5em;
 
6
        }
 
7
        .programlisting {
 
8
            background: #eeeeff;
 
9
            border: solid 1px #aaaaff;
 
10
            padding: 0.5em;
 
11
        }
 
12
        .variablelist {
 
13
            padding: 4px;
 
14
            margin-left: 3em;
 
15
        }
 
16
        .navigation {
 
17
            background: #ffeeee;
 
18
            border: solid 1px #ffaaaa;
 
19
            margin-top: 0.5em;
 
20
            margin-bottom: 0.5em;
 
21
        }
 
22
        .navigation a {
 
23
            color: #770000;
 
24
        }
 
25
        .navigation a:visited {
 
26
            color: #550000;
 
27
        }
 
28
        .navigation .title {
 
29
            font-size: 200%;
 
30
        }
 
31
      </style></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="libgimp-gimpimage.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td><td><a accesskey="u" href="libgimp-image.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td><td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td><th width="100%" align="center">GIMP Library Reference Manual</th><td><a accesskey="n" href="libgimp-gimppaths.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td></tr></table><div class="refentry" lang="en"><a name="libgimp-gimplayer"></a><div class="titlepage"></div><div class="refnamediv"><h2><span class="refentrytitle">gimplayer</span></h2><p>gimplayer &#8212; Operations on a single layer.</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="synopsis">
 
32
 
 
33
 
 
34
 
 
35
<a
 
36
href="../glib/glib-Basic-Types.html#gint32"
 
37
>gint32</a>      <a href="libgimp-gimplayer.html#gimp-layer-new">gimp_layer_new</a>                  (<a
 
38
href="../glib/glib-Basic-Types.html#gint32"
 
39
>gint32</a> image_ID,
 
40
                                             const <a
 
41
href="../glib/glib-Basic-Types.html#gchar"
 
42
>gchar</a> *name,
 
43
                                             <a
 
44
href="../glib/glib-Basic-Types.html#gint"
 
45
>gint</a> width,
 
46
                                             <a
 
47
href="../glib/glib-Basic-Types.html#gint"
 
48
>gint</a> height,
 
49
                                             <a
 
50
href="../libgimpbase/libgimpbase-gimpbaseenums.html#GimpImageType"
 
51
>GimpImageType</a> type,
 
52
                                             <a
 
53
href="../glib/glib-Basic-Types.html#gdouble"
 
54
>gdouble</a> opacity,
 
55
                                             <a href="libgimp-gimpenums.html#GimpLayerModeEffects">GimpLayerModeEffects</a> mode);
 
56
<a
 
57
href="../glib/glib-Basic-Types.html#gint32"
 
58
>gint32</a>      <a href="libgimp-gimplayer.html#gimp-layer-copy">gimp_layer_copy</a>                 (<a
 
59
href="../glib/glib-Basic-Types.html#gint32"
 
60
>gint32</a> layer_ID);
 
61
<a
 
62
href="../glib/glib-Basic-Types.html#gboolean"
 
63
>gboolean</a>    <a href="libgimp-gimplayer.html#gimp-layer-scale">gimp_layer_scale</a>                (<a
 
64
href="../glib/glib-Basic-Types.html#gint32"
 
65
>gint32</a> layer_ID,
 
66
                                             <a
 
67
href="../glib/glib-Basic-Types.html#gint"
 
68
>gint</a> new_width,
 
69
                                             <a
 
70
href="../glib/glib-Basic-Types.html#gint"
 
71
>gint</a> new_height,
 
72
                                             <a
 
73
href="../glib/glib-Basic-Types.html#gboolean"
 
74
>gboolean</a> local_origin);
 
75
<a
 
76
href="../glib/glib-Basic-Types.html#gboolean"
 
77
>gboolean</a>    <a href="libgimp-gimplayer.html#gimp-layer-resize">gimp_layer_resize</a>               (<a
 
78
href="../glib/glib-Basic-Types.html#gint32"
 
79
>gint32</a> layer_ID,
 
80
                                             <a
 
81
href="../glib/glib-Basic-Types.html#gint"
 
82
>gint</a> new_width,
 
83
                                             <a
 
84
href="../glib/glib-Basic-Types.html#gint"
 
85
>gint</a> new_height,
 
86
                                             <a
 
87
href="../glib/glib-Basic-Types.html#gint"
 
88
>gint</a> offx,
 
89
                                             <a
 
90
href="../glib/glib-Basic-Types.html#gint"
 
91
>gint</a> offy);
 
92
<a
 
93
href="../glib/glib-Basic-Types.html#gboolean"
 
94
>gboolean</a>    <a href="libgimp-gimplayer.html#gimp-layer-resize-to-image-size">gimp_layer_resize_to_image_size</a> (<a
 
95
href="../glib/glib-Basic-Types.html#gint32"
 
96
>gint32</a> layer_ID);
 
97
<a
 
98
href="../glib/glib-Basic-Types.html#gboolean"
 
99
>gboolean</a>    <a href="libgimp-gimplayer.html#gimp-layer-translate">gimp_layer_translate</a>            (<a
 
100
href="../glib/glib-Basic-Types.html#gint32"
 
101
>gint32</a> layer_ID,
 
102
                                             <a
 
103
href="../glib/glib-Basic-Types.html#gint"
 
104
>gint</a> offx,
 
105
                                             <a
 
106
href="../glib/glib-Basic-Types.html#gint"
 
107
>gint</a> offy);
 
108
<a
 
109
href="../glib/glib-Basic-Types.html#gboolean"
 
110
>gboolean</a>    <a href="libgimp-gimplayer.html#gimp-layer-add-alpha">gimp_layer_add_alpha</a>            (<a
 
111
href="../glib/glib-Basic-Types.html#gint32"
 
112
>gint32</a> layer_ID);
 
113
<a
 
114
href="../glib/glib-Basic-Types.html#gboolean"
 
115
>gboolean</a>    <a href="libgimp-gimplayer.html#gimp-layer-set-offsets">gimp_layer_set_offsets</a>          (<a
 
116
href="../glib/glib-Basic-Types.html#gint32"
 
117
>gint32</a> layer_ID,
 
118
                                             <a
 
119
href="../glib/glib-Basic-Types.html#gint"
 
120
>gint</a> offx,
 
121
                                             <a
 
122
href="../glib/glib-Basic-Types.html#gint"
 
123
>gint</a> offy);
 
124
<a
 
125
href="../glib/glib-Basic-Types.html#gint32"
 
126
>gint32</a>      <a href="libgimp-gimplayer.html#gimp-layer-create-mask">gimp_layer_create_mask</a>          (<a
 
127
href="../glib/glib-Basic-Types.html#gint32"
 
128
>gint32</a> layer_ID,
 
129
                                             <a href="libgimp-gimpenums.html#GimpAddMaskType">GimpAddMaskType</a> mask_type);
 
130
<a
 
131
href="../glib/glib-Basic-Types.html#gint32"
 
132
>gint32</a>      <a href="libgimp-gimplayer.html#gimp-layer-from-mask">gimp_layer_from_mask</a>            (<a
 
133
href="../glib/glib-Basic-Types.html#gint32"
 
134
>gint32</a> mask_ID);
 
135
<a
 
136
href="../glib/glib-Basic-Types.html#gint32"
 
137
>gint32</a>      <a href="libgimp-gimplayer.html#gimp-layer-get-mask">gimp_layer_get_mask</a>             (<a
 
138
href="../glib/glib-Basic-Types.html#gint32"
 
139
>gint32</a> layer_ID);
 
140
<a
 
141
href="../glib/glib-Basic-Types.html#gboolean"
 
142
>gboolean</a>    <a href="libgimp-gimplayer.html#gimp-layer-add-mask">gimp_layer_add_mask</a>             (<a
 
143
href="../glib/glib-Basic-Types.html#gint32"
 
144
>gint32</a> layer_ID,
 
145
                                             <a
 
146
href="../glib/glib-Basic-Types.html#gint32"
 
147
>gint32</a> mask_ID);
 
148
<a
 
149
href="../glib/glib-Basic-Types.html#gboolean"
 
150
>gboolean</a>    <a href="libgimp-gimplayer.html#gimp-layer-remove-mask">gimp_layer_remove_mask</a>          (<a
 
151
href="../glib/glib-Basic-Types.html#gint32"
 
152
>gint32</a> layer_ID,
 
153
                                             <a href="libgimp-gimpenums.html#GimpMaskApplyMode">GimpMaskApplyMode</a> mode);
 
154
<a
 
155
href="../glib/glib-Basic-Types.html#gint32"
 
156
>gint32</a>      <a href="libgimp-gimplayer.html#gimp-layer-new-from-drawable">gimp_layer_new_from_drawable</a>    (<a
 
157
href="../glib/glib-Basic-Types.html#gint32"
 
158
>gint32</a> drawable_ID,
 
159
                                             <a
 
160
href="../glib/glib-Basic-Types.html#gint32"
 
161
>gint32</a> dest_image_ID);
 
162
<a
 
163
href="../glib/glib-Basic-Types.html#gboolean"
 
164
>gboolean</a>    <a href="libgimp-gimplayer.html#gimp-layer-get-preserve-trans">gimp_layer_get_preserve_trans</a>   (<a
 
165
href="../glib/glib-Basic-Types.html#gint32"
 
166
>gint32</a> layer_ID);
 
167
<a
 
168
href="../glib/glib-Basic-Types.html#gboolean"
 
169
>gboolean</a>    <a href="libgimp-gimplayer.html#gimp-layer-set-preserve-trans">gimp_layer_set_preserve_trans</a>   (<a
 
170
href="../glib/glib-Basic-Types.html#gint32"
 
171
>gint32</a> layer_ID,
 
172
                                             <a
 
173
href="../glib/glib-Basic-Types.html#gboolean"
 
174
>gboolean</a> preserve_trans);
 
175
<a
 
176
href="../glib/glib-Basic-Types.html#gboolean"
 
177
>gboolean</a>    <a href="libgimp-gimplayer.html#gimp-layer-get-apply-mask">gimp_layer_get_apply_mask</a>       (<a
 
178
href="../glib/glib-Basic-Types.html#gint32"
 
179
>gint32</a> layer_ID);
 
180
<a
 
181
href="../glib/glib-Basic-Types.html#gboolean"
 
182
>gboolean</a>    <a href="libgimp-gimplayer.html#gimp-layer-set-apply-mask">gimp_layer_set_apply_mask</a>       (<a
 
183
href="../glib/glib-Basic-Types.html#gint32"
 
184
>gint32</a> layer_ID,
 
185
                                             <a
 
186
href="../glib/glib-Basic-Types.html#gboolean"
 
187
>gboolean</a> apply_mask);
 
188
<a
 
189
href="../glib/glib-Basic-Types.html#gboolean"
 
190
>gboolean</a>    <a href="libgimp-gimplayer.html#gimp-layer-get-show-mask">gimp_layer_get_show_mask</a>        (<a
 
191
href="../glib/glib-Basic-Types.html#gint32"
 
192
>gint32</a> layer_ID);
 
193
<a
 
194
href="../glib/glib-Basic-Types.html#gboolean"
 
195
>gboolean</a>    <a href="libgimp-gimplayer.html#gimp-layer-set-show-mask">gimp_layer_set_show_mask</a>        (<a
 
196
href="../glib/glib-Basic-Types.html#gint32"
 
197
>gint32</a> layer_ID,
 
198
                                             <a
 
199
href="../glib/glib-Basic-Types.html#gboolean"
 
200
>gboolean</a> show_mask);
 
201
<a
 
202
href="../glib/glib-Basic-Types.html#gboolean"
 
203
>gboolean</a>    <a href="libgimp-gimplayer.html#gimp-layer-get-edit-mask">gimp_layer_get_edit_mask</a>        (<a
 
204
href="../glib/glib-Basic-Types.html#gint32"
 
205
>gint32</a> layer_ID);
 
206
<a
 
207
href="../glib/glib-Basic-Types.html#gboolean"
 
208
>gboolean</a>    <a href="libgimp-gimplayer.html#gimp-layer-set-edit-mask">gimp_layer_set_edit_mask</a>        (<a
 
209
href="../glib/glib-Basic-Types.html#gint32"
 
210
>gint32</a> layer_ID,
 
211
                                             <a
 
212
href="../glib/glib-Basic-Types.html#gboolean"
 
213
>gboolean</a> edit_mask);
 
214
<a
 
215
href="../glib/glib-Basic-Types.html#gdouble"
 
216
>gdouble</a>     <a href="libgimp-gimplayer.html#gimp-layer-get-opacity">gimp_layer_get_opacity</a>          (<a
 
217
href="../glib/glib-Basic-Types.html#gint32"
 
218
>gint32</a> layer_ID);
 
219
<a
 
220
href="../glib/glib-Basic-Types.html#gboolean"
 
221
>gboolean</a>    <a href="libgimp-gimplayer.html#gimp-layer-set-opacity">gimp_layer_set_opacity</a>          (<a
 
222
href="../glib/glib-Basic-Types.html#gint32"
 
223
>gint32</a> layer_ID,
 
224
                                             <a
 
225
href="../glib/glib-Basic-Types.html#gdouble"
 
226
>gdouble</a> opacity);
 
227
<a href="libgimp-gimpenums.html#GimpLayerModeEffects">GimpLayerModeEffects</a> <a href="libgimp-gimplayer.html#gimp-layer-get-mode">gimp_layer_get_mode</a>    (<a
 
228
href="../glib/glib-Basic-Types.html#gint32"
 
229
>gint32</a> layer_ID);
 
230
<a
 
231
href="../glib/glib-Basic-Types.html#gboolean"
 
232
>gboolean</a>    <a href="libgimp-gimplayer.html#gimp-layer-set-mode">gimp_layer_set_mode</a>             (<a
 
233
href="../glib/glib-Basic-Types.html#gint32"
 
234
>gint32</a> layer_ID,
 
235
                                             <a href="libgimp-gimpenums.html#GimpLayerModeEffects">GimpLayerModeEffects</a> mode);
 
236
<a
 
237
href="../glib/glib-Basic-Types.html#gboolean"
 
238
>gboolean</a>    <a href="libgimp-gimplayer.html#gimp-layer-is-floating-sel">gimp_layer_is_floating_sel</a>      (<a
 
239
href="../glib/glib-Basic-Types.html#gint32"
 
240
>gint32</a> layer_ID);
 
241
</pre></div><div class="refsect1" lang="en"><a name="id2594072"></a><h2>Description</h2><p>
 
242
Operations on a single layer.
 
243
 
 
244
</p></div><div class="refsect1" lang="en"><a name="id2594081"></a><h2>Details</h2><div class="refsect2" lang="en"><a name="id2594086"></a><h3><a name="gimp-layer-new"></a>gimp_layer_new ()</h3><a class="indexterm" name="id2594095"></a><pre class="programlisting"><a
 
245
href="../glib/glib-Basic-Types.html#gint32"
 
246
>gint32</a>      gimp_layer_new                  (<a
 
247
href="../glib/glib-Basic-Types.html#gint32"
 
248
>gint32</a> image_ID,
 
249
                                             const <a
 
250
href="../glib/glib-Basic-Types.html#gchar"
 
251
>gchar</a> *name,
 
252
                                             <a
 
253
href="../glib/glib-Basic-Types.html#gint"
 
254
>gint</a> width,
 
255
                                             <a
 
256
href="../glib/glib-Basic-Types.html#gint"
 
257
>gint</a> height,
 
258
                                             <a
 
259
href="../libgimpbase/libgimpbase-gimpbaseenums.html#GimpImageType"
 
260
>GimpImageType</a> type,
 
261
                                             <a
 
262
href="../glib/glib-Basic-Types.html#gdouble"
 
263
>gdouble</a> opacity,
 
264
                                             <a href="libgimp-gimpenums.html#GimpLayerModeEffects">GimpLayerModeEffects</a> mode);</pre><p>
 
265
Create a new layer.
 
266
</p><p>
 
267
This procedure creates a new layer with the specified width, height,
 
268
and type. Name, opacity, and mode are also supplied parameters. The
 
269
new layer still needs to be added to the image, as this is not
 
270
automatic. Add the new layer with the 'gimp_image_add_layer'
 
271
command. Other attributes such as layer mask modes, and offsets
 
272
should be set with explicit procedure calls.</p><p>
 
273
 
 
274
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>image_ID</tt></i>�:</span></td><td> The image to which to add the layer.
 
275
</td></tr><tr><td><span class="term"><i class="parameter"><tt>name</tt></i>�:</span></td><td> The layer name.
 
276
</td></tr><tr><td><span class="term"><i class="parameter"><tt>width</tt></i>�:</span></td><td> The layer width.
 
277
</td></tr><tr><td><span class="term"><i class="parameter"><tt>height</tt></i>�:</span></td><td> The layer height.
 
278
</td></tr><tr><td><span class="term"><i class="parameter"><tt>type</tt></i>�:</span></td><td> The layer type.
 
279
</td></tr><tr><td><span class="term"><i class="parameter"><tt>opacity</tt></i>�:</span></td><td> The layer opacity.
 
280
</td></tr><tr><td><span class="term"><i class="parameter"><tt>mode</tt></i>�:</span></td><td> The layer combination mode.
 
281
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> The newly created layer.
 
282
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2594253"></a><h3><a name="gimp-layer-copy"></a>gimp_layer_copy ()</h3><a class="indexterm" name="id2594262"></a><pre class="programlisting"><a
 
283
href="../glib/glib-Basic-Types.html#gint32"
 
284
>gint32</a>      gimp_layer_copy                 (<a
 
285
href="../glib/glib-Basic-Types.html#gint32"
 
286
>gint32</a> layer_ID);</pre><p>
 
287
Copy a layer.
 
288
</p><p>
 
289
This procedure copies the specified layer and returns the copy. The
 
290
newly copied layer is for use within the original layer's image. It
 
291
should not be subsequently added to any other image. If you create
 
292
a copy of the background layer, remember to add an alpha channel
 
293
before you add the new layer to the image.</p><p>
 
294
 
 
295
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>layer_ID</tt></i>�:</span></td><td> The layer to copy.
 
296
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> The newly copied layer.
 
297
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2620510"></a><h3><a name="gimp-layer-scale"></a>gimp_layer_scale ()</h3><a class="indexterm" name="id2620518"></a><pre class="programlisting"><a
 
298
href="../glib/glib-Basic-Types.html#gboolean"
 
299
>gboolean</a>    gimp_layer_scale                (<a
 
300
href="../glib/glib-Basic-Types.html#gint32"
 
301
>gint32</a> layer_ID,
 
302
                                             <a
 
303
href="../glib/glib-Basic-Types.html#gint"
 
304
>gint</a> new_width,
 
305
                                             <a
 
306
href="../glib/glib-Basic-Types.html#gint"
 
307
>gint</a> new_height,
 
308
                                             <a
 
309
href="../glib/glib-Basic-Types.html#gboolean"
 
310
>gboolean</a> local_origin);</pre><p>
 
311
Scale the layer to the specified extents.
 
312
</p><p>
 
313
This procedure scales the layer so that it's new width and height
 
314
are equal to the supplied parameters. The \"local_origin\" parameter
 
315
specifies whether to scale from the center of the layer, or from the
 
316
image origin. This operation only works if the layer has been added
 
317
to an image.</p><p>
 
318
 
 
319
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>layer_ID</tt></i>�:</span></td><td> The layer.
 
320
</td></tr><tr><td><span class="term"><i class="parameter"><tt>new_width</tt></i>�:</span></td><td> New layer width.
 
321
</td></tr><tr><td><span class="term"><i class="parameter"><tt>new_height</tt></i>�:</span></td><td> New layer height.
 
322
</td></tr><tr><td><span class="term"><i class="parameter"><tt>local_origin</tt></i>�:</span></td><td> Use a local origin (as opposed to the image origin).
 
323
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> TRUE on success.
 
324
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2620625"></a><h3><a name="gimp-layer-resize"></a>gimp_layer_resize ()</h3><a class="indexterm" name="id2620633"></a><pre class="programlisting"><a
 
325
href="../glib/glib-Basic-Types.html#gboolean"
 
326
>gboolean</a>    gimp_layer_resize               (<a
 
327
href="../glib/glib-Basic-Types.html#gint32"
 
328
>gint32</a> layer_ID,
 
329
                                             <a
 
330
href="../glib/glib-Basic-Types.html#gint"
 
331
>gint</a> new_width,
 
332
                                             <a
 
333
href="../glib/glib-Basic-Types.html#gint"
 
334
>gint</a> new_height,
 
335
                                             <a
 
336
href="../glib/glib-Basic-Types.html#gint"
 
337
>gint</a> offx,
 
338
                                             <a
 
339
href="../glib/glib-Basic-Types.html#gint"
 
340
>gint</a> offy);</pre><p>
 
341
Resize the layer to the specified extents.
 
342
</p><p>
 
343
This procedure resizes the layer so that it's new width and height
 
344
are equal to the supplied parameters. Offsets are also provided
 
345
which describe the position of the previous layer's content. This
 
346
operation only works if the layer has been added to an image.</p><p>
 
347
 
 
348
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>layer_ID</tt></i>�:</span></td><td> The layer.
 
349
</td></tr><tr><td><span class="term"><i class="parameter"><tt>new_width</tt></i>�:</span></td><td> New layer width.
 
350
</td></tr><tr><td><span class="term"><i class="parameter"><tt>new_height</tt></i>�:</span></td><td> New layer height.
 
351
</td></tr><tr><td><span class="term"><i class="parameter"><tt>offx</tt></i>�:</span></td><td> x offset between upper left corner of old and new layers: (old - new).
 
352
</td></tr><tr><td><span class="term"><i class="parameter"><tt>offy</tt></i>�:</span></td><td> y offset between upper left corner of old and new layers: (old - new).
 
353
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> TRUE on success.
 
354
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2620759"></a><h3><a name="gimp-layer-resize-to-image-size"></a>gimp_layer_resize_to_image_size ()</h3><a class="indexterm" name="id2620770"></a><pre class="programlisting"><a
 
355
href="../glib/glib-Basic-Types.html#gboolean"
 
356
>gboolean</a>    gimp_layer_resize_to_image_size (<a
 
357
href="../glib/glib-Basic-Types.html#gint32"
 
358
>gint32</a> layer_ID);</pre><p>
 
359
Resize a layer to the image size.
 
360
</p><p>
 
361
This procedure resizes the layer so that it's new width and height
 
362
are equal to the width and height of its image container.</p><p>
 
363
 
 
364
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>layer_ID</tt></i>�:</span></td><td> The layer to resize.
 
365
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> TRUE on success.
 
366
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2620825"></a><h3><a name="gimp-layer-translate"></a>gimp_layer_translate ()</h3><a class="indexterm" name="id2620833"></a><pre class="programlisting"><a
 
367
href="../glib/glib-Basic-Types.html#gboolean"
 
368
>gboolean</a>    gimp_layer_translate            (<a
 
369
href="../glib/glib-Basic-Types.html#gint32"
 
370
>gint32</a> layer_ID,
 
371
                                             <a
 
372
href="../glib/glib-Basic-Types.html#gint"
 
373
>gint</a> offx,
 
374
                                             <a
 
375
href="../glib/glib-Basic-Types.html#gint"
 
376
>gint</a> offy);</pre><p>
 
377
Translate the layer by the specified offsets.
 
378
</p><p>
 
379
This procedure translates the layer by the amounts specified in the
 
380
x and y arguments. These can be negative, and are considered offsets
 
381
from the current position. This command only works if the layer has
 
382
been added to an image. All additional layers contained in the image
 
383
which have the linked flag set to TRUE w ill also be translated by
 
384
the specified offsets.</p><p>
 
385
 
 
386
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>layer_ID</tt></i>�:</span></td><td> The layer.
 
387
</td></tr><tr><td><span class="term"><i class="parameter"><tt>offx</tt></i>�:</span></td><td> Offset in x direction.
 
388
</td></tr><tr><td><span class="term"><i class="parameter"><tt>offy</tt></i>�:</span></td><td> Offset in y direction.
 
389
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> TRUE on success.
 
390
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2620925"></a><h3><a name="gimp-layer-add-alpha"></a>gimp_layer_add_alpha ()</h3><a class="indexterm" name="id2620933"></a><pre class="programlisting"><a
 
391
href="../glib/glib-Basic-Types.html#gboolean"
 
392
>gboolean</a>    gimp_layer_add_alpha            (<a
 
393
href="../glib/glib-Basic-Types.html#gint32"
 
394
>gint32</a> layer_ID);</pre><p>
 
395
Add an alpha channel to the layer if it doesn't already have one.
 
396
</p><p>
 
397
This procedure adds an additional component to the specified layer
 
398
if it does not already possess an alpha channel. An alpha channel
 
399
makes it possible to move a layer from the bottom of the layer stack
 
400
and to clear and erase to transparency, instead of the background
 
401
color. This transforms images of type RGB to RGBA, GRAY to GRAYA,
 
402
and INDEXED to INDEXEDA.</p><p>
 
403
 
 
404
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>layer_ID</tt></i>�:</span></td><td> The layer.
 
405
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> TRUE on success.
 
406
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2620991"></a><h3><a name="gimp-layer-set-offsets"></a>gimp_layer_set_offsets ()</h3><a class="indexterm" name="id2620999"></a><pre class="programlisting"><a
 
407
href="../glib/glib-Basic-Types.html#gboolean"
 
408
>gboolean</a>    gimp_layer_set_offsets          (<a
 
409
href="../glib/glib-Basic-Types.html#gint32"
 
410
>gint32</a> layer_ID,
 
411
                                             <a
 
412
href="../glib/glib-Basic-Types.html#gint"
 
413
>gint</a> offx,
 
414
                                             <a
 
415
href="../glib/glib-Basic-Types.html#gint"
 
416
>gint</a> offy);</pre><p>
 
417
Set the layer offsets.
 
418
</p><p>
 
419
This procedure sets the offsets for the specified layer. The offsets
 
420
are relative to the image origin and can be any values. This
 
421
operation is valid only on layers which have been added to an image.</p><p>
 
422
 
 
423
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>layer_ID</tt></i>�:</span></td><td> The layer.
 
424
</td></tr><tr><td><span class="term"><i class="parameter"><tt>offx</tt></i>�:</span></td><td> Offset in x direction.
 
425
</td></tr><tr><td><span class="term"><i class="parameter"><tt>offy</tt></i>�:</span></td><td> Offset in y direction.
 
426
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> TRUE on success.
 
427
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2621087"></a><h3><a name="gimp-layer-create-mask"></a>gimp_layer_create_mask ()</h3><a class="indexterm" name="id2621096"></a><pre class="programlisting"><a
 
428
href="../glib/glib-Basic-Types.html#gint32"
 
429
>gint32</a>      gimp_layer_create_mask          (<a
 
430
href="../glib/glib-Basic-Types.html#gint32"
 
431
>gint32</a> layer_ID,
 
432
                                             <a href="libgimp-gimpenums.html#GimpAddMaskType">GimpAddMaskType</a> mask_type);</pre><p>
 
433
Create a layer mask for the specified specified layer.
 
434
</p><p>
 
435
This procedure creates a layer mask for the specified layer. Layer
 
436
masks serve as an additional alpha channel for a layer. A number of
 
437
ifferent types of masks are allowed for initialisation: completely
 
438
white masks (which will leave the layer fully visible), completely
 
439
black masks (which will give the layer complete transparency, the
 
440
layer's already existing alpha channel (which will leave the layer
 
441
fully visible, but which may be more useful than a white mask), the
 
442
current selection or a grayscale copy of the layer. The layer mask
 
443
still needs to be added to the layer. This can be done with a call
 
444
to 'gimp_layer_add_mask'.</p><p>
 
445
 
 
446
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>layer_ID</tt></i>�:</span></td><td> The layer to which to add the mask.
 
447
</td></tr><tr><td><span class="term"><i class="parameter"><tt>mask_type</tt></i>�:</span></td><td> The type of mask.
 
448
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> The newly created mask.
 
449
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2621146"></a><h3><a name="gimp-layer-from-mask"></a>gimp_layer_from_mask ()</h3><a class="indexterm" name="id2621154"></a><pre class="programlisting"><a
 
450
href="../glib/glib-Basic-Types.html#gint32"
 
451
>gint32</a>      gimp_layer_from_mask            (<a
 
452
href="../glib/glib-Basic-Types.html#gint32"
 
453
>gint32</a> mask_ID);</pre><p>
 
454
Get the specified mask's layer.
 
455
</p><p>
 
456
This procedure returns the specified mask's layer , or -1 if none
 
457
exists.</p><p>
 
458
 
 
459
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>mask_ID</tt></i>�:</span></td><td> Mask for which to return the layer.
 
460
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> The mask's layer.
 
461
 
 
462
</td></tr></tbody></table></div><p>Since  GIMP 2.2
 
463
</p></div><hr><div class="refsect2" lang="en"><a name="id2621204"></a><h3><a name="gimp-layer-get-mask"></a>gimp_layer_get_mask ()</h3><a class="indexterm" name="id2621211"></a><pre class="programlisting"><a
 
464
href="../glib/glib-Basic-Types.html#gint32"
 
465
>gint32</a>      gimp_layer_get_mask             (<a
 
466
href="../glib/glib-Basic-Types.html#gint32"
 
467
>gint32</a> layer_ID);</pre><p>
 
468
Get the specified layer's mask if it exists.
 
469
</p><p>
 
470
This procedure returns the specified layer's mask, or -1 if none
 
471
exists.</p><p>
 
472
 
 
473
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>layer_ID</tt></i>�:</span></td><td> The layer.
 
474
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> The layer mask.
 
475
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2621260"></a><h3><a name="gimp-layer-add-mask"></a>gimp_layer_add_mask ()</h3><a class="indexterm" name="id2621267"></a><pre class="programlisting"><a
 
476
href="../glib/glib-Basic-Types.html#gboolean"
 
477
>gboolean</a>    gimp_layer_add_mask             (<a
 
478
href="../glib/glib-Basic-Types.html#gint32"
 
479
>gint32</a> layer_ID,
 
480
                                             <a
 
481
href="../glib/glib-Basic-Types.html#gint32"
 
482
>gint32</a> mask_ID);</pre><p>
 
483
Add a layer mask to the specified layer.
 
484
</p><p>
 
485
This procedure adds a layer mask to the specified layer. Layer masks
 
486
serve as an additional alpha channel for a layer. This procedure
 
487
will fail if a number of prerequisites aren't met. The layer cannot
 
488
already have a layer mask. The specified mask must exist and have
 
489
the same dimensions as the layer. Both the mask and the layer must
 
490
have been created for use with the specified image.</p><p>
 
491
 
 
492
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>layer_ID</tt></i>�:</span></td><td> The layer to receive the mask.
 
493
</td></tr><tr><td><span class="term"><i class="parameter"><tt>mask_ID</tt></i>�:</span></td><td> The mask to add to the layer.
 
494
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> TRUE on success.
 
495
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2621337"></a><h3><a name="gimp-layer-remove-mask"></a>gimp_layer_remove_mask ()</h3><a class="indexterm" name="id2621345"></a><pre class="programlisting"><a
 
496
href="../glib/glib-Basic-Types.html#gboolean"
 
497
>gboolean</a>    gimp_layer_remove_mask          (<a
 
498
href="../glib/glib-Basic-Types.html#gint32"
 
499
>gint32</a> layer_ID,
 
500
                                             <a href="libgimp-gimpenums.html#GimpMaskApplyMode">GimpMaskApplyMode</a> mode);</pre><p>
 
501
Remove the specified layer mask from the layer.
 
502
</p><p>
 
503
This procedure removes the specified layer mask from the layer. If
 
504
the mask doesn't exist, an error is returned.</p><p>
 
505
 
 
506
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>layer_ID</tt></i>�:</span></td><td> The layer from which to remove mask.
 
507
</td></tr><tr><td><span class="term"><i class="parameter"><tt>mode</tt></i>�:</span></td><td> Removal mode.
 
508
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> TRUE on success.
 
509
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2621415"></a><h3><a name="gimp-layer-new-from-drawable"></a>gimp_layer_new_from_drawable ()</h3><a class="indexterm" name="id2621423"></a><pre class="programlisting"><a
 
510
href="../glib/glib-Basic-Types.html#gint32"
 
511
>gint32</a>      gimp_layer_new_from_drawable    (<a
 
512
href="../glib/glib-Basic-Types.html#gint32"
 
513
>gint32</a> drawable_ID,
 
514
                                             <a
 
515
href="../glib/glib-Basic-Types.html#gint32"
 
516
>gint32</a> dest_image_ID);</pre><p>
 
517
Create a new layer by copying an existing drawable.
 
518
</p><p>
 
519
This procedure creates a new layer as a copy of the specified
 
520
drawable. The new layer still needs to be added to the image, as
 
521
this is not automatic. Add the new layer with the
 
522
'gimp_image_add_layer' command. Other attributes such as layer mask
 
523
modes, and offsets should be set with explicit procedure calls.</p><p>
 
524
 
 
525
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>drawable_ID</tt></i>�:</span></td><td> The source drawable from where the new layer is copied.
 
526
</td></tr><tr><td><span class="term"><i class="parameter"><tt>dest_image_ID</tt></i>�:</span></td><td> The destination image to which to add the layer.
 
527
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> The newly copied layer.
 
528
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2621498"></a><h3><a name="gimp-layer-get-preserve-trans"></a>gimp_layer_get_preserve_trans ()</h3><a class="indexterm" name="id2621506"></a><pre class="programlisting"><a
 
529
href="../glib/glib-Basic-Types.html#gboolean"
 
530
>gboolean</a>    gimp_layer_get_preserve_trans   (<a
 
531
href="../glib/glib-Basic-Types.html#gint32"
 
532
>gint32</a> layer_ID);</pre><p>
 
533
Get the preserve transperancy setting of the specified layer.
 
534
</p><p>
 
535
This procedure returns the specified layer's preserve transperancy
 
536
setting.</p><p>
 
537
 
 
538
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>layer_ID</tt></i>�:</span></td><td> The layer.
 
539
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> The layer's preserve transperancy setting.
 
540
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2621560"></a><h3><a name="gimp-layer-set-preserve-trans"></a>gimp_layer_set_preserve_trans ()</h3><a class="indexterm" name="id2621570"></a><pre class="programlisting"><a
 
541
href="../glib/glib-Basic-Types.html#gboolean"
 
542
>gboolean</a>    gimp_layer_set_preserve_trans   (<a
 
543
href="../glib/glib-Basic-Types.html#gint32"
 
544
>gint32</a> layer_ID,
 
545
                                             <a
 
546
href="../glib/glib-Basic-Types.html#gboolean"
 
547
>gboolean</a> preserve_trans);</pre><p>
 
548
Set the preserve transperancy setting of the specified layer.
 
549
</p><p>
 
550
This procedure sets the specified layer's preserve transperancy
 
551
setting.</p><p>
 
552
 
 
553
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>layer_ID</tt></i>�:</span></td><td> The layer.
 
554
</td></tr><tr><td><span class="term"><i class="parameter"><tt>preserve_trans</tt></i>�:</span></td><td> The new layer's preserve transperancy setting.
 
555
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> TRUE on success.
 
556
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2621640"></a><h3><a name="gimp-layer-get-apply-mask"></a>gimp_layer_get_apply_mask ()</h3><a class="indexterm" name="id2621649"></a><pre class="programlisting"><a
 
557
href="../glib/glib-Basic-Types.html#gboolean"
 
558
>gboolean</a>    gimp_layer_get_apply_mask       (<a
 
559
href="../glib/glib-Basic-Types.html#gint32"
 
560
>gint32</a> layer_ID);</pre><p>
 
561
Get the apply mask of the specified layer.
 
562
</p><p>
 
563
This procedure returns the specified layer's apply mask. If the
 
564
value is non-zero, then the layer mask for this layer is currently
 
565
being composited with the layer's alpha channel.</p><p>
 
566
 
 
567
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>layer_ID</tt></i>�:</span></td><td> The layer.
 
568
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> The layer apply mask.
 
569
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2621703"></a><h3><a name="gimp-layer-set-apply-mask"></a>gimp_layer_set_apply_mask ()</h3><a class="indexterm" name="id2621712"></a><pre class="programlisting"><a
 
570
href="../glib/glib-Basic-Types.html#gboolean"
 
571
>gboolean</a>    gimp_layer_set_apply_mask       (<a
 
572
href="../glib/glib-Basic-Types.html#gint32"
 
573
>gint32</a> layer_ID,
 
574
                                             <a
 
575
href="../glib/glib-Basic-Types.html#gboolean"
 
576
>gboolean</a> apply_mask);</pre><p>
 
577
Set the apply mask of the specified layer.
 
578
</p><p>
 
579
This procedure sets the specified layer's apply mask. This controls
 
580
whether the layer's mask is currently affecting the alpha channel.
 
581
If there is no layer mask, this function will return an error.</p><p>
 
582
 
 
583
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>layer_ID</tt></i>�:</span></td><td> The layer.
 
584
</td></tr><tr><td><span class="term"><i class="parameter"><tt>apply_mask</tt></i>�:</span></td><td> The new layer apply mask.
 
585
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> TRUE on success.
 
586
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2621783"></a><h3><a name="gimp-layer-get-show-mask"></a>gimp_layer_get_show_mask ()</h3><a class="indexterm" name="id2621792"></a><pre class="programlisting"><a
 
587
href="../glib/glib-Basic-Types.html#gboolean"
 
588
>gboolean</a>    gimp_layer_get_show_mask        (<a
 
589
href="../glib/glib-Basic-Types.html#gint32"
 
590
>gint32</a> layer_ID);</pre><p>
 
591
Get the show mask of the specified layer.
 
592
</p><p>
 
593
This procedure returns the specified layer's show mask. If the value
 
594
is non-zero, then the layer mask for this layer is currently being
 
595
shown instead of the layer.</p><p>
 
596
 
 
597
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>layer_ID</tt></i>�:</span></td><td> The layer.
 
598
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> The layer show mask.
 
599
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2621844"></a><h3><a name="gimp-layer-set-show-mask"></a>gimp_layer_set_show_mask ()</h3><a class="indexterm" name="id2621853"></a><pre class="programlisting"><a
 
600
href="../glib/glib-Basic-Types.html#gboolean"
 
601
>gboolean</a>    gimp_layer_set_show_mask        (<a
 
602
href="../glib/glib-Basic-Types.html#gint32"
 
603
>gint32</a> layer_ID,
 
604
                                             <a
 
605
href="../glib/glib-Basic-Types.html#gboolean"
 
606
>gboolean</a> show_mask);</pre><p>
 
607
Set the show mask of the specified layer.
 
608
</p><p>
 
609
This procedure sets the specified layer's show mask. This controls
 
610
whether the layer or it's mask is visible. Non-zero values indicate
 
611
that the mask should be visible. If the layer has no mask, then this
 
612
function returns an error.</p><p>
 
613
 
 
614
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>layer_ID</tt></i>�:</span></td><td> The layer.
 
615
</td></tr><tr><td><span class="term"><i class="parameter"><tt>show_mask</tt></i>�:</span></td><td> The new layer show mask.
 
616
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> TRUE on success.
 
617
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2621924"></a><h3><a name="gimp-layer-get-edit-mask"></a>gimp_layer_get_edit_mask ()</h3><a class="indexterm" name="id2621932"></a><pre class="programlisting"><a
 
618
href="../glib/glib-Basic-Types.html#gboolean"
 
619
>gboolean</a>    gimp_layer_get_edit_mask        (<a
 
620
href="../glib/glib-Basic-Types.html#gint32"
 
621
>gint32</a> layer_ID);</pre><p>
 
622
Get the show mask of the specified layer.
 
623
</p><p>
 
624
This procedure returns the specified layer's show mask. If the value
 
625
is non-zero, then the layer mask for this layer is currently active,
 
626
and not the layer.</p><p>
 
627
 
 
628
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>layer_ID</tt></i>�:</span></td><td> The layer.
 
629
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> The layer show mask.
 
630
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2621984"></a><h3><a name="gimp-layer-set-edit-mask"></a>gimp_layer_set_edit_mask ()</h3><a class="indexterm" name="id2621993"></a><pre class="programlisting"><a
 
631
href="../glib/glib-Basic-Types.html#gboolean"
 
632
>gboolean</a>    gimp_layer_set_edit_mask        (<a
 
633
href="../glib/glib-Basic-Types.html#gint32"
 
634
>gint32</a> layer_ID,
 
635
                                             <a
 
636
href="../glib/glib-Basic-Types.html#gboolean"
 
637
>gboolean</a> edit_mask);</pre><p>
 
638
Set the show mask of the specified layer.
 
639
</p><p>
 
640
This procedure sets the specified layer's show mask. This controls
 
641
whether the layer or it's mask is currently active for editing. If
 
642
the specified layer has no layer mask, then this procedure will
 
643
return an error.</p><p>
 
644
 
 
645
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>layer_ID</tt></i>�:</span></td><td> The layer.
 
646
</td></tr><tr><td><span class="term"><i class="parameter"><tt>edit_mask</tt></i>�:</span></td><td> The new layer show mask.
 
647
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> TRUE on success.
 
648
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2622063"></a><h3><a name="gimp-layer-get-opacity"></a>gimp_layer_get_opacity ()</h3><a class="indexterm" name="id2622072"></a><pre class="programlisting"><a
 
649
href="../glib/glib-Basic-Types.html#gdouble"
 
650
>gdouble</a>     gimp_layer_get_opacity          (<a
 
651
href="../glib/glib-Basic-Types.html#gint32"
 
652
>gint32</a> layer_ID);</pre><p>
 
653
Get the opacity of the specified layer.
 
654
</p><p>
 
655
This procedure returns the specified layer's opacity.</p><p>
 
656
 
 
657
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>layer_ID</tt></i>�:</span></td><td> The layer.
 
658
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> The layer opacity.
 
659
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2622122"></a><h3><a name="gimp-layer-set-opacity"></a>gimp_layer_set_opacity ()</h3><a class="indexterm" name="id2622131"></a><pre class="programlisting"><a
 
660
href="../glib/glib-Basic-Types.html#gboolean"
 
661
>gboolean</a>    gimp_layer_set_opacity          (<a
 
662
href="../glib/glib-Basic-Types.html#gint32"
 
663
>gint32</a> layer_ID,
 
664
                                             <a
 
665
href="../glib/glib-Basic-Types.html#gdouble"
 
666
>gdouble</a> opacity);</pre><p>
 
667
Set the opacity of the specified layer.
 
668
</p><p>
 
669
This procedure sets the specified layer's opacity.</p><p>
 
670
 
 
671
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>layer_ID</tt></i>�:</span></td><td> The layer.
 
672
</td></tr><tr><td><span class="term"><i class="parameter"><tt>opacity</tt></i>�:</span></td><td> The new layer opacity.
 
673
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> TRUE on success.
 
674
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2622205"></a><h3><a name="gimp-layer-get-mode"></a>gimp_layer_get_mode ()</h3><a class="indexterm" name="id2622215"></a><pre class="programlisting"><a href="libgimp-gimpenums.html#GimpLayerModeEffects">GimpLayerModeEffects</a> gimp_layer_get_mode    (<a
 
675
href="../glib/glib-Basic-Types.html#gint32"
 
676
>gint32</a> layer_ID);</pre><p>
 
677
Get the combination mode of the specified layer.
 
678
</p><p>
 
679
This procedure returns the specified layer's combination mode.</p><p>
 
680
 
 
681
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>layer_ID</tt></i>�:</span></td><td> The layer.
 
682
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> The layer combination mode.
 
683
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2622277"></a><h3><a name="gimp-layer-set-mode"></a>gimp_layer_set_mode ()</h3><a class="indexterm" name="id2622287"></a><pre class="programlisting"><a
 
684
href="../glib/glib-Basic-Types.html#gboolean"
 
685
>gboolean</a>    gimp_layer_set_mode             (<a
 
686
href="../glib/glib-Basic-Types.html#gint32"
 
687
>gint32</a> layer_ID,
 
688
                                             <a href="libgimp-gimpenums.html#GimpLayerModeEffects">GimpLayerModeEffects</a> mode);</pre><p>
 
689
Set the combination mode of the specified layer.
 
690
</p><p>
 
691
This procedure sets the specified layer's combination mode.</p><p>
 
692
 
 
693
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>layer_ID</tt></i>�:</span></td><td> The layer.
 
694
</td></tr><tr><td><span class="term"><i class="parameter"><tt>mode</tt></i>�:</span></td><td> The new layer combination mode.
 
695
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> TRUE on success.
 
696
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2622369"></a><h3><a name="gimp-layer-is-floating-sel"></a>gimp_layer_is_floating_sel ()</h3><a class="indexterm" name="id2622379"></a><pre class="programlisting"><a
 
697
href="../glib/glib-Basic-Types.html#gboolean"
 
698
>gboolean</a>    gimp_layer_is_floating_sel      (<a
 
699
href="../glib/glib-Basic-Types.html#gint32"
 
700
>gint32</a> layer_ID);</pre><p>
 
701
Is the specified layer a floating selection?
 
702
</p><p>
 
703
This procedure returns whether the layer is a floating selection.
 
704
Floating selections are special cases of layers which are attached
 
705
to a specific drawable.</p><p>
 
706
 
 
707
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>layer_ID</tt></i>�:</span></td><td> The layer.
 
708
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> Non-zero if the layer is a floating selection.
 
709
</td></tr></tbody></table></div></div></div></div><table class="navigation" width="100%" summary="Navigation footer" cellpadding="2" cellspacing="0"><tr valign="middle"><td align="left"><a accesskey="p" href="libgimp-gimpimage.html"><b>&lt;&lt;�gimpimage</b></a></td><td align="right"><a accesskey="n" href="libgimp-gimppaths.html"><b>gimppaths�&gt;&gt;</b></a></td></tr></table></body></html>