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.68.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.3 (XML mode)"><link rel="stylesheet" href="style.css" type="text/css"><link rel="part" href="gimpdefinitions.html" title="Part�I.�GIMP Constants"><link rel="part" href="libgimp.html" title="Part�II.�GIMP Library"><link rel="chapter" href="libgimp-general.html" title="Functions not Related to Specific Images"><link rel="chapter" href="libgimp-image.html" title="Manupulating Images and all their Properties"><link rel="chapter" href="libgimp-data.html" title="Data Objects"><link rel="chapter" href="libgimp-selectors.html" title="Controlling the Core's Selection Dialogs"><link rel="part" href="libgimpui.html" title="Part�III.�GIMP User Interface Library"><link rel="chapter" href="libgimpui-hierarchy.html" title="Object Hierarchy"></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"><table width="100%"><tr><td valign="top"><h2><span class="refentrytitle">gimplayer</span></h2><p>gimplayer — Operations on a single layer.</p></td><td valign="top" align="right"></td></tr></table></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="synopsis">
5
gint32 <a href="libgimp-gimplayer.html#gimp-layer-new">gimp_layer_new</a> (gint32 image_ID,
10
href="../libgimpbase/libgimpbase-gimpbaseenums.html#GimpImageType"
11
>GimpImageType</a> type,
13
<a href="libgimp-gimpenums.html#GimpLayerModeEffects">GimpLayerModeEffects</a> mode);
14
gint32 <a href="libgimp-gimplayer.html#gimp-layer-copy">gimp_layer_copy</a> (gint32 layer_ID);
15
gboolean <a href="libgimp-gimplayer.html#gimp-layer-scale">gimp_layer_scale</a> (gint32 layer_ID,
18
gboolean local_origin);
19
gboolean <a href="libgimp-gimplayer.html#gimp-layer-resize">gimp_layer_resize</a> (gint32 layer_ID,
24
gboolean <a href="libgimp-gimplayer.html#gimp-layer-resize-to-image-size">gimp_layer_resize_to_image_size</a> (gint32 layer_ID);
25
gboolean <a href="libgimp-gimplayer.html#gimp-layer-translate">gimp_layer_translate</a> (gint32 layer_ID,
28
gboolean <a href="libgimp-gimplayer.html#gimp-layer-add-alpha">gimp_layer_add_alpha</a> (gint32 layer_ID);
29
gboolean <a href="libgimp-gimplayer.html#gimp-layer-set-offsets">gimp_layer_set_offsets</a> (gint32 layer_ID,
32
gint32 <a href="libgimp-gimplayer.html#gimp-layer-create-mask">gimp_layer_create_mask</a> (gint32 layer_ID,
33
<a href="libgimp-gimpenums.html#GimpAddMaskType">GimpAddMaskType</a> mask_type);
34
gint32 <a href="libgimp-gimplayer.html#gimp-layer-from-mask">gimp_layer_from_mask</a> (gint32 mask_ID);
35
gint32 <a href="libgimp-gimplayer.html#gimp-layer-get-mask">gimp_layer_get_mask</a> (gint32 layer_ID);
36
gboolean <a href="libgimp-gimplayer.html#gimp-layer-add-mask">gimp_layer_add_mask</a> (gint32 layer_ID,
38
gboolean <a href="libgimp-gimplayer.html#gimp-layer-remove-mask">gimp_layer_remove_mask</a> (gint32 layer_ID,
39
<a href="libgimp-gimpenums.html#GimpMaskApplyMode">GimpMaskApplyMode</a> mode);
40
gint32 <a href="libgimp-gimplayer.html#gimp-layer-new-from-drawable">gimp_layer_new_from_drawable</a> (gint32 drawable_ID,
41
gint32 dest_image_ID);
42
gboolean <a href="libgimp-gimplayer.html#gimp-layer-get-preserve-trans">gimp_layer_get_preserve_trans</a> (gint32 layer_ID);
43
gboolean <a href="libgimp-gimplayer.html#gimp-layer-set-preserve-trans">gimp_layer_set_preserve_trans</a> (gint32 layer_ID,
44
gboolean preserve_trans);
45
gboolean <a href="libgimp-gimplayer.html#gimp-layer-get-apply-mask">gimp_layer_get_apply_mask</a> (gint32 layer_ID);
46
gboolean <a href="libgimp-gimplayer.html#gimp-layer-set-apply-mask">gimp_layer_set_apply_mask</a> (gint32 layer_ID,
48
gboolean <a href="libgimp-gimplayer.html#gimp-layer-get-show-mask">gimp_layer_get_show_mask</a> (gint32 layer_ID);
49
gboolean <a href="libgimp-gimplayer.html#gimp-layer-set-show-mask">gimp_layer_set_show_mask</a> (gint32 layer_ID,
51
gboolean <a href="libgimp-gimplayer.html#gimp-layer-get-edit-mask">gimp_layer_get_edit_mask</a> (gint32 layer_ID);
52
gboolean <a href="libgimp-gimplayer.html#gimp-layer-set-edit-mask">gimp_layer_set_edit_mask</a> (gint32 layer_ID,
54
gdouble <a href="libgimp-gimplayer.html#gimp-layer-get-opacity">gimp_layer_get_opacity</a> (gint32 layer_ID);
55
gboolean <a href="libgimp-gimplayer.html#gimp-layer-set-opacity">gimp_layer_set_opacity</a> (gint32 layer_ID,
57
<a href="libgimp-gimpenums.html#GimpLayerModeEffects">GimpLayerModeEffects</a> <a href="libgimp-gimplayer.html#gimp-layer-get-mode">gimp_layer_get_mode</a> (gint32 layer_ID);
58
gboolean <a href="libgimp-gimplayer.html#gimp-layer-set-mode">gimp_layer_set_mode</a> (gint32 layer_ID,
59
<a href="libgimp-gimpenums.html#GimpLayerModeEffects">GimpLayerModeEffects</a> mode);
60
gboolean <a href="libgimp-gimplayer.html#gimp-layer-is-floating-sel">gimp_layer_is_floating_sel</a> (gint32 layer_ID);
61
</pre></div><div class="refsect1" lang="en"><a name="id2611347"></a><h2>Description</h2><p>
62
Operations on a single layer.
64
</p></div><div class="refsect1" lang="en"><a name="id2611357"></a><h2>Details</h2><div class="refsect2" lang="en"><a name="id2611362"></a><h3><a name="gimp-layer-new"></a>gimp_layer_new ()</h3><a class="indexterm" name="id2611371"></a><pre class="programlisting">gint32 gimp_layer_new (gint32 image_ID,
69
href="../libgimpbase/libgimpbase-gimpbaseenums.html#GimpImageType"
70
>GimpImageType</a> type,
72
<a href="libgimp-gimpenums.html#GimpLayerModeEffects">GimpLayerModeEffects</a> mode);</pre><p>
75
This procedure creates a new layer with the specified width, height,
76
and type. Name, opacity, and mode are also supplied parameters. The
77
new layer still needs to be added to the image, as this is not
78
automatic. Add the new layer with the 'gimp_image_add_layer'
79
command. Other attributes such as layer mask modes, and offsets
80
should be set with explicit procedure calls.</p><p>
82
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>image_ID</code></em>�:</span></td><td> The image to which to add the layer.
83
</td></tr><tr><td><span class="term"><em class="parameter"><code>name</code></em>�:</span></td><td> The layer name.
84
</td></tr><tr><td><span class="term"><em class="parameter"><code>width</code></em>�:</span></td><td> The layer width.
85
</td></tr><tr><td><span class="term"><em class="parameter"><code>height</code></em>�:</span></td><td> The layer height.
86
</td></tr><tr><td><span class="term"><em class="parameter"><code>type</code></em>�:</span></td><td> The layer type.
87
</td></tr><tr><td><span class="term"><em class="parameter"><code>opacity</code></em>�:</span></td><td> The layer opacity.
88
</td></tr><tr><td><span class="term"><em class="parameter"><code>mode</code></em>�:</span></td><td> The layer combination mode.
89
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>�:</span></td><td> The newly created layer.
90
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2611528"></a><h3><a name="gimp-layer-copy"></a>gimp_layer_copy ()</h3><a class="indexterm" name="id2611537"></a><pre class="programlisting">gint32 gimp_layer_copy (gint32 layer_ID);</pre><p>
93
This procedure copies the specified layer and returns the copy. The
94
newly copied layer is for use within the original layer's image. It
95
should not be subsequently added to any other image. If you create
96
a copy of the background layer, remember to add an alpha channel
97
before you add the new layer to the image.</p><p>
99
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>layer_ID</code></em>�:</span></td><td> The layer to copy.
100
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>�:</span></td><td> The newly copied layer.
101
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2621878"></a><h3><a name="gimp-layer-scale"></a>gimp_layer_scale ()</h3><a class="indexterm" name="id2621886"></a><pre class="programlisting">gboolean gimp_layer_scale (gint32 layer_ID,
104
gboolean local_origin);</pre><p>
105
Scale the layer to the specified extents.
107
This procedure scales the layer so that it's new width and height
108
are equal to the supplied parameters. The \"local_origin\" parameter
109
specifies whether to scale from the center of the layer, or from the
110
image origin. This operation only works if the layer has been added
113
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>layer_ID</code></em>�:</span></td><td> The layer.
114
</td></tr><tr><td><span class="term"><em class="parameter"><code>new_width</code></em>�:</span></td><td> New layer width.
115
</td></tr><tr><td><span class="term"><em class="parameter"><code>new_height</code></em>�:</span></td><td> New layer height.
116
</td></tr><tr><td><span class="term"><em class="parameter"><code>local_origin</code></em>�:</span></td><td> Use a local origin (as opposed to the image origin).
117
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>�:</span></td><td> TRUE on success.
118
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2621993"></a><h3><a name="gimp-layer-resize"></a>gimp_layer_resize ()</h3><a class="indexterm" name="id2622001"></a><pre class="programlisting">gboolean gimp_layer_resize (gint32 layer_ID,
123
Resize the layer to the specified extents.
125
This procedure resizes the layer so that it's new width and height
126
are equal to the supplied parameters. Offsets are also provided
127
which describe the position of the previous layer's content. This
128
operation only works if the layer has been added to an image.</p><p>
130
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>layer_ID</code></em>�:</span></td><td> The layer.
131
</td></tr><tr><td><span class="term"><em class="parameter"><code>new_width</code></em>�:</span></td><td> New layer width.
132
</td></tr><tr><td><span class="term"><em class="parameter"><code>new_height</code></em>�:</span></td><td> New layer height.
133
</td></tr><tr><td><span class="term"><em class="parameter"><code>offx</code></em>�:</span></td><td> x offset between upper left corner of old and new layers: (old - new).
134
</td></tr><tr><td><span class="term"><em class="parameter"><code>offy</code></em>�:</span></td><td> y offset between upper left corner of old and new layers: (old - new).
135
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>�:</span></td><td> TRUE on success.
136
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2622127"></a><h3><a name="gimp-layer-resize-to-image-size"></a>gimp_layer_resize_to_image_size ()</h3><a class="indexterm" name="id2622135"></a><pre class="programlisting">gboolean gimp_layer_resize_to_image_size (gint32 layer_ID);</pre><p>
137
Resize a layer to the image size.
139
This procedure resizes the layer so that it's new width and height
140
are equal to the width and height of its image container.</p><p>
142
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>layer_ID</code></em>�:</span></td><td> The layer to resize.
143
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>�:</span></td><td> TRUE on success.
144
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2622189"></a><h3><a name="gimp-layer-translate"></a>gimp_layer_translate ()</h3><a class="indexterm" name="id2622198"></a><pre class="programlisting">gboolean gimp_layer_translate (gint32 layer_ID,
147
Translate the layer by the specified offsets.
149
This procedure translates the layer by the amounts specified in the
150
x and y arguments. These can be negative, and are considered offsets
151
from the current position. This command only works if the layer has
152
been added to an image. All additional layers contained in the image
153
which have the linked flag set to TRUE w ill also be translated by
154
the specified offsets.</p><p>
156
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>layer_ID</code></em>�:</span></td><td> The layer.
157
</td></tr><tr><td><span class="term"><em class="parameter"><code>offx</code></em>�:</span></td><td> Offset in x direction.
158
</td></tr><tr><td><span class="term"><em class="parameter"><code>offy</code></em>�:</span></td><td> Offset in y direction.
159
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>�:</span></td><td> TRUE on success.
160
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2622289"></a><h3><a name="gimp-layer-add-alpha"></a>gimp_layer_add_alpha ()</h3><a class="indexterm" name="id2622298"></a><pre class="programlisting">gboolean gimp_layer_add_alpha (gint32 layer_ID);</pre><p>
161
Add an alpha channel to the layer if it doesn't already have one.
163
This procedure adds an additional component to the specified layer
164
if it does not already possess an alpha channel. An alpha channel
165
makes it possible to move a layer from the bottom of the layer stack
166
and to clear and erase to transparency, instead of the background
167
color. This transforms images of type RGB to RGBA, GRAY to GRAYA,
168
and INDEXED to INDEXEDA.</p><p>
170
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>layer_ID</code></em>�:</span></td><td> The layer.
171
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>�:</span></td><td> TRUE on success.
172
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2622355"></a><h3><a name="gimp-layer-set-offsets"></a>gimp_layer_set_offsets ()</h3><a class="indexterm" name="id2622364"></a><pre class="programlisting">gboolean gimp_layer_set_offsets (gint32 layer_ID,
175
Set the layer offsets.
177
This procedure sets the offsets for the specified layer. The offsets
178
are relative to the image origin and can be any values. This
179
operation is valid only on layers which have been added to an image.</p><p>
181
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>layer_ID</code></em>�:</span></td><td> The layer.
182
</td></tr><tr><td><span class="term"><em class="parameter"><code>offx</code></em>�:</span></td><td> Offset in x direction.
183
</td></tr><tr><td><span class="term"><em class="parameter"><code>offy</code></em>�:</span></td><td> Offset in y direction.
184
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>�:</span></td><td> TRUE on success.
185
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2622452"></a><h3><a name="gimp-layer-create-mask"></a>gimp_layer_create_mask ()</h3><a class="indexterm" name="id2622460"></a><pre class="programlisting">gint32 gimp_layer_create_mask (gint32 layer_ID,
186
<a href="libgimp-gimpenums.html#GimpAddMaskType">GimpAddMaskType</a> mask_type);</pre><p>
187
Create a layer mask for the specified specified layer.
189
This procedure creates a layer mask for the specified layer. Layer
190
masks serve as an additional alpha channel for a layer. A number of
191
ifferent types of masks are allowed for initialisation: completely
192
white masks (which will leave the layer fully visible), completely
193
black masks (which will give the layer complete transparency, the
194
layer's already existing alpha channel (which will leave the layer
195
fully visible, but which may be more useful than a white mask), the
196
current selection or a grayscale copy of the layer. The layer mask
197
still needs to be added to the layer. This can be done with a call
198
to 'gimp_layer_add_mask'.</p><p>
200
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>layer_ID</code></em>�:</span></td><td> The layer to which to add the mask.
201
</td></tr><tr><td><span class="term"><em class="parameter"><code>mask_type</code></em>�:</span></td><td> The type of mask.
202
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>�:</span></td><td> The newly created mask.
203
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2598941"></a><h3><a name="gimp-layer-from-mask"></a>gimp_layer_from_mask ()</h3><a class="indexterm" name="id2589800"></a><pre class="programlisting">gint32 gimp_layer_from_mask (gint32 mask_ID);</pre><p>
204
Get the specified mask's layer.
206
This procedure returns the specified mask's layer , or -1 if none
209
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>mask_ID</code></em>�:</span></td><td> Mask for which to return the layer.
210
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>�:</span></td><td> The mask's layer.
212
</td></tr></tbody></table></div><p>Since GIMP 2.2
213
</p></div><hr><div class="refsect2" lang="en"><a name="id2622541"></a><h3><a name="gimp-layer-get-mask"></a>gimp_layer_get_mask ()</h3><a class="indexterm" name="id2622548"></a><pre class="programlisting">gint32 gimp_layer_get_mask (gint32 layer_ID);</pre><p>
214
Get the specified layer's mask if it exists.
216
This procedure returns the specified layer's mask, or -1 if none
219
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>layer_ID</code></em>�:</span></td><td> The layer.
220
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>�:</span></td><td> The layer mask.
221
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2622596"></a><h3><a name="gimp-layer-add-mask"></a>gimp_layer_add_mask ()</h3><a class="indexterm" name="id2622604"></a><pre class="programlisting">gboolean gimp_layer_add_mask (gint32 layer_ID,
222
gint32 mask_ID);</pre><p>
223
Add a layer mask to the specified layer.
225
This procedure adds a layer mask to the specified layer. Layer masks
226
serve as an additional alpha channel for a layer. This procedure
227
will fail if a number of prerequisites aren't met. The layer cannot
228
already have a layer mask. The specified mask must exist and have
229
the same dimensions as the layer. Both the mask and the layer must
230
have been created for use with the specified image.</p><p>
232
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>layer_ID</code></em>�:</span></td><td> The layer to receive the mask.
233
</td></tr><tr><td><span class="term"><em class="parameter"><code>mask_ID</code></em>�:</span></td><td> The mask to add to the layer.
234
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>�:</span></td><td> TRUE on success.
235
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2622673"></a><h3><a name="gimp-layer-remove-mask"></a>gimp_layer_remove_mask ()</h3><a class="indexterm" name="id2622681"></a><pre class="programlisting">gboolean gimp_layer_remove_mask (gint32 layer_ID,
236
<a href="libgimp-gimpenums.html#GimpMaskApplyMode">GimpMaskApplyMode</a> mode);</pre><p>
237
Remove the specified layer mask from the layer.
239
This procedure removes the specified layer mask from the layer. If
240
the mask doesn't exist, an error is returned.</p><p>
242
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>layer_ID</code></em>�:</span></td><td> The layer from which to remove mask.
243
</td></tr><tr><td><span class="term"><em class="parameter"><code>mode</code></em>�:</span></td><td> Removal mode.
244
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>�:</span></td><td> TRUE on success.
245
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2622746"></a><h3><a name="gimp-layer-new-from-drawable"></a>gimp_layer_new_from_drawable ()</h3><a class="indexterm" name="id2622753"></a><pre class="programlisting">gint32 gimp_layer_new_from_drawable (gint32 drawable_ID,
246
gint32 dest_image_ID);</pre><p>
247
Create a new layer by copying an existing drawable.
249
This procedure creates a new layer as a copy of the specified
250
drawable. The new layer still needs to be added to the image, as
251
this is not automatic. Add the new layer with the
252
'gimp_image_add_layer' command. Other attributes such as layer mask
253
modes, and offsets should be set with explicit procedure calls.</p><p>
255
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>drawable_ID</code></em>�:</span></td><td> The source drawable from where the new layer is copied.
256
</td></tr><tr><td><span class="term"><em class="parameter"><code>dest_image_ID</code></em>�:</span></td><td> The destination image to which to add the layer.
257
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>�:</span></td><td> The newly copied layer.
258
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2622826"></a><h3><a name="gimp-layer-get-preserve-trans"></a>gimp_layer_get_preserve_trans ()</h3><a class="indexterm" name="id2622835"></a><pre class="programlisting">gboolean gimp_layer_get_preserve_trans (gint32 layer_ID);</pre><p>
259
Get the preserve transperancy setting of the specified layer.
261
This procedure returns the specified layer's preserve transperancy
264
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>layer_ID</code></em>�:</span></td><td> The layer.
265
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>�:</span></td><td> The layer's preserve transperancy setting.
266
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2622888"></a><h3><a name="gimp-layer-set-preserve-trans"></a>gimp_layer_set_preserve_trans ()</h3><a class="indexterm" name="id2622897"></a><pre class="programlisting">gboolean gimp_layer_set_preserve_trans (gint32 layer_ID,
267
gboolean preserve_trans);</pre><p>
268
Set the preserve transperancy setting of the specified layer.
270
This procedure sets the specified layer's preserve transperancy
273
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>layer_ID</code></em>�:</span></td><td> The layer.
274
</td></tr><tr><td><span class="term"><em class="parameter"><code>preserve_trans</code></em>�:</span></td><td> The new layer's preserve transperancy setting.
275
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>�:</span></td><td> TRUE on success.
276
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2622967"></a><h3><a name="gimp-layer-get-apply-mask"></a>gimp_layer_get_apply_mask ()</h3><a class="indexterm" name="id2622975"></a><pre class="programlisting">gboolean gimp_layer_get_apply_mask (gint32 layer_ID);</pre><p>
277
Get the apply mask of the specified layer.
279
This procedure returns the specified layer's apply mask. If the
280
value is non-zero, then the layer mask for this layer is currently
281
being composited with the layer's alpha channel.</p><p>
283
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>layer_ID</code></em>�:</span></td><td> The layer.
284
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>�:</span></td><td> The layer apply mask.
285
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2623029"></a><h3><a name="gimp-layer-set-apply-mask"></a>gimp_layer_set_apply_mask ()</h3><a class="indexterm" name="id2623037"></a><pre class="programlisting">gboolean gimp_layer_set_apply_mask (gint32 layer_ID,
286
gboolean apply_mask);</pre><p>
287
Set the apply mask of the specified layer.
289
This procedure sets the specified layer's apply mask. This controls
290
whether the layer's mask is currently affecting the alpha channel.
291
If there is no layer mask, this function will return an error.</p><p>
293
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>layer_ID</code></em>�:</span></td><td> The layer.
294
</td></tr><tr><td><span class="term"><em class="parameter"><code>apply_mask</code></em>�:</span></td><td> The new layer apply mask.
295
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>�:</span></td><td> TRUE on success.
296
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2623108"></a><h3><a name="gimp-layer-get-show-mask"></a>gimp_layer_get_show_mask ()</h3><a class="indexterm" name="id2623117"></a><pre class="programlisting">gboolean gimp_layer_get_show_mask (gint32 layer_ID);</pre><p>
297
Get the show mask of the specified layer.
299
This procedure returns the specified layer's show mask. If the value
300
is non-zero, then the layer mask for this layer is currently being
301
shown instead of the layer.</p><p>
303
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>layer_ID</code></em>�:</span></td><td> The layer.
304
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>�:</span></td><td> The layer show mask.
305
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2623170"></a><h3><a name="gimp-layer-set-show-mask"></a>gimp_layer_set_show_mask ()</h3><a class="indexterm" name="id2623178"></a><pre class="programlisting">gboolean gimp_layer_set_show_mask (gint32 layer_ID,
306
gboolean show_mask);</pre><p>
307
Set the show mask of the specified layer.
309
This procedure sets the specified layer's show mask. This controls
310
whether the layer or it's mask is visible. Non-zero values indicate
311
that the mask should be visible. If the layer has no mask, then this
312
function returns an error.</p><p>
314
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>layer_ID</code></em>�:</span></td><td> The layer.
315
</td></tr><tr><td><span class="term"><em class="parameter"><code>show_mask</code></em>�:</span></td><td> The new layer show mask.
316
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>�:</span></td><td> TRUE on success.
317
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2623249"></a><h3><a name="gimp-layer-get-edit-mask"></a>gimp_layer_get_edit_mask ()</h3><a class="indexterm" name="id2623257"></a><pre class="programlisting">gboolean gimp_layer_get_edit_mask (gint32 layer_ID);</pre><p>
318
Get the show mask of the specified layer.
320
This procedure returns the specified layer's show mask. If the value
321
is non-zero, then the layer mask for this layer is currently active,
322
and not the layer.</p><p>
324
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>layer_ID</code></em>�:</span></td><td> The layer.
325
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>�:</span></td><td> The layer show mask.
326
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2623310"></a><h3><a name="gimp-layer-set-edit-mask"></a>gimp_layer_set_edit_mask ()</h3><a class="indexterm" name="id2623318"></a><pre class="programlisting">gboolean gimp_layer_set_edit_mask (gint32 layer_ID,
327
gboolean edit_mask);</pre><p>
328
Set the show mask of the specified layer.
330
This procedure sets the specified layer's show mask. This controls
331
whether the layer or it's mask is currently active for editing. If
332
the specified layer has no layer mask, then this procedure will
333
return an error.</p><p>
335
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>layer_ID</code></em>�:</span></td><td> The layer.
336
</td></tr><tr><td><span class="term"><em class="parameter"><code>edit_mask</code></em>�:</span></td><td> The new layer show mask.
337
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>�:</span></td><td> TRUE on success.
338
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2623388"></a><h3><a name="gimp-layer-get-opacity"></a>gimp_layer_get_opacity ()</h3><a class="indexterm" name="id2623397"></a><pre class="programlisting">gdouble gimp_layer_get_opacity (gint32 layer_ID);</pre><p>
339
Get the opacity of the specified layer.
341
This procedure returns the specified layer's opacity.</p><p>
343
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>layer_ID</code></em>�:</span></td><td> The layer.
344
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>�:</span></td><td> The layer opacity.
345
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2623448"></a><h3><a name="gimp-layer-set-opacity"></a>gimp_layer_set_opacity ()</h3><a class="indexterm" name="id2623456"></a><pre class="programlisting">gboolean gimp_layer_set_opacity (gint32 layer_ID,
346
gdouble opacity);</pre><p>
347
Set the opacity of the specified layer.
349
This procedure sets the specified layer's opacity.</p><p>
351
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>layer_ID</code></em>�:</span></td><td> The layer.
352
</td></tr><tr><td><span class="term"><em class="parameter"><code>opacity</code></em>�:</span></td><td> The new layer opacity.
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="id2623524"></a><h3><a name="gimp-layer-get-mode"></a>gimp_layer_get_mode ()</h3><a class="indexterm" name="id2623532"></a><pre class="programlisting"><a href="libgimp-gimpenums.html#GimpLayerModeEffects">GimpLayerModeEffects</a> gimp_layer_get_mode (gint32 layer_ID);</pre><p>
355
Get the combination mode of the specified layer.
357
This procedure returns the specified layer's combination mode.</p><p>
359
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>layer_ID</code></em>�:</span></td><td> The layer.
360
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>�:</span></td><td> The layer combination mode.
361
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2623584"></a><h3><a name="gimp-layer-set-mode"></a>gimp_layer_set_mode ()</h3><a class="indexterm" name="id2623592"></a><pre class="programlisting">gboolean gimp_layer_set_mode (gint32 layer_ID,
362
<a href="libgimp-gimpenums.html#GimpLayerModeEffects">GimpLayerModeEffects</a> mode);</pre><p>
363
Set the combination mode of the specified layer.
365
This procedure sets the specified layer's combination mode.</p><p>
367
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>layer_ID</code></em>�:</span></td><td> The layer.
368
</td></tr><tr><td><span class="term"><em class="parameter"><code>mode</code></em>�:</span></td><td> The new layer combination mode.
369
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>�:</span></td><td> TRUE on success.
370
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2623661"></a><h3><a name="gimp-layer-is-floating-sel"></a>gimp_layer_is_floating_sel ()</h3><a class="indexterm" name="id2623670"></a><pre class="programlisting">gboolean gimp_layer_is_floating_sel (gint32 layer_ID);</pre><p>
371
Is the specified layer a floating selection?
373
This procedure returns whether the layer is a floating selection.
374
Floating selections are special cases of layers which are attached
375
to a specific drawable.</p><p>
377
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>layer_ID</code></em>�:</span></td><td> The layer.
378
</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.
379
</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><<�gimpimage</b></a></td><td align="right"><a accesskey="n" href="libgimp-gimppaths.html"><b>gimppaths�>></b></a></td></tr></table></body></html>