### Function

# Gimp edit_paste

#### Declaration [src]

    GimpLayer**
    gimp_edit_paste (
      GimpDrawable* drawable,
      gboolean paste_into,
      gint* num_layers
    )

#### Description [src]

Paste buffer to the specified drawable.

This procedure pastes a copy of the internal GIMP edit buffer to the specified drawable. The GIMP edit buffer will be empty unless a call was previously made to either `gimp_edit_cut()` or gimp_edit_copy(). The "paste_into" option specifies whether to clear the current image selection, or to paste the buffer "behind" the selection. This allows the selection to act as a mask for the pasted buffer. Anywhere that the selection mask is non-zero, the pasted buffer will show through. The pasted data may be a floating selection when relevant, layers otherwise. If the image has a floating selection at the time of pasting, the old floating selection will be anchored to its drawable before the new floating selection is added. This procedure returns the new layers (floating or not). If the result is a floating selection, it will already be attached to the specified drawable, and a subsequent call to floating_sel_attach is not needed.

#### Parameters

`drawable` | `GimpDrawable`
| The drawable to paste to.
| The data is owned by the caller of the function.
`paste_into` | `gboolean`
| Clear selection, or paste behind it?
`num_layers` | `gint*`
| The newly pasted layers.
| The argument will be set by the function.

#### Return value

Returns: | An array of `GimpLayer*`
         The list of pasted layers.
         The returned value must be freed with g_free().
| The length of the array is in the `num_layers` argument.
| The caller of the function takes ownership of the data container, but not the data inside it.