### Class

# Gimp Layer

#### Description [src]

    final class Gimp.Layer : Gimp.Drawable {
      /* No available fields */
    }

Operations on a single layer.

#### Ancestors

- GimpDrawable
- GimpItem
- GObject

#### Constructors

###### gimp_layer_group_new

Create a new layer group.

Available since: 2.8

###### gimp_layer_new

Create a new layer.

Available since: 3.0

###### gimp_layer_new_from_drawable

Create a new layer by copying an existing drawable.

###### gimp_layer_new_from_pixbuf

Create a new layer from a %GdkPixbuf.

Available since: 2.2

###### gimp_layer_new_from_surface

Create a new layer from a #cairo_surface_t.

Available since: 2.8

###### gimp_layer_new_from_visible

Create a new layer from what is visible in an image.

Available since: 2.6

#### Functions

###### gimp_layer_from_mask

Get the specified mask’s layer.

Available since: 2.2

###### gimp_layer_get_by_id

Returns a `GimpLayer` representing `layer_id`. This function calls `gimp_item_get_by_id()` and returns the item if it is layer or `NULL` otherwise.

Available since: 3.0

#### Instance methods

###### gimp_layer_add_alpha

Add an alpha channel to the layer if it doesn’t already have one.

###### gimp_layer_add_mask

Add a layer mask to the specified layer.

###### gimp_layer_copy

Copy a layer.

Available since: 3.0

###### gimp_layer_create_mask

Create a layer mask for the specified layer.

###### gimp_layer_flatten

Remove the alpha channel from the layer if it has one.

Available since: 2.4

###### gimp_layer_get_apply_mask

Get the apply mask setting of the specified layer.

###### gimp_layer_get_blend_space

Get the blend space of the specified layer.

Available since: 2.10

###### gimp_layer_get_composite_mode

Get the composite mode of the specified layer.

Available since: 2.10

###### gimp_layer_get_composite_space

Get the composite space of the specified layer.

Available since: 2.10

###### gimp_layer_get_edit_mask

Get the edit mask setting of the specified layer.

###### gimp_layer_get_lock_alpha

Get the lock alpha channel setting of the specified layer.

###### gimp_layer_get_mask

Get the specified layer’s mask if it exists.

###### gimp_layer_get_mode

Get the combination mode of the specified layer.

###### gimp_layer_get_opacity

Get the opacity of the specified layer.

###### gimp_layer_get_show_mask

Get the show mask setting of the specified layer.

###### gimp_layer_is_floating_sel

Is the specified layer a floating selection?

###### gimp_layer_remove_mask

Remove the specified layer mask from the layer.

###### gimp_layer_resize

Resize the layer to the specified extents.

###### gimp_layer_resize_to_image_size

Resize a layer to the image size.

###### gimp_layer_scale

Scale the layer using the default interpolation method.

###### gimp_layer_set_apply_mask

Set the apply mask setting of the specified layer.

###### gimp_layer_set_blend_space

Set the blend space of the specified layer.

Available since: 2.10

###### gimp_layer_set_composite_mode

Set the composite mode of the specified layer.

Available since: 2.10

###### gimp_layer_set_composite_space

Set the composite space of the specified layer.

Available since: 2.10

###### gimp_layer_set_edit_mask

Set the edit mask setting of the specified layer.

###### gimp_layer_set_lock_alpha

Set the lock alpha channel setting of the specified layer.

###### gimp_layer_set_mode

Set the combination mode of the specified layer.

###### gimp_layer_set_offsets

Set the layer offsets.

###### gimp_layer_set_opacity

Set the opacity of the specified layer.

###### gimp_layer_set_show_mask

Set the show mask setting of the specified layer.

##### Methods inherited from GimpDrawable (48)

Please see GimpDrawable for a full list of methods.

##### Methods inherited from GimpItem (45)

Please see GimpItem for a full list of methods.

##### Methods inherited from GObject (43)

Please see GObject for a full list of methods.

#### Properties

##### Properties inherited from GimpItem (1)

###### Gimp.Item:id

No description available.

#### Signals

##### Signals inherited from GObject (1)

###### GObject.Object::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

#### Class structure

    struct GimpLayerClass {
      GimpDrawableClass parent_class;

    }

###### Class members

`parent_class`

    GimpDrawableClass

| No description available.