Constructor
GimpLayernew_from_surface
Declaration [src]
GimpLayer*
gimp_layer_new_from_surface (
GimpImage* image,
const gchar* name,
cairo_surface_t* surface,
gdouble progress_start,
gdouble progress_end
)
Description [src]
Create a new layer from a #cairo_surface_t.
This procedure creates a new layer from the given
cairo_surface_t. The image has to be an RGB image and just like
with gimp_layer_new()
you will still need to add the layer to it.
If you pass progress_end
> progress_start
to this function,
gimp_progress_update()
will be called for. You have to call
gimp_progress_init()
beforehand then.
Available since: | 2.8 |
Parameters
image |
GimpImage |
The RGB image to which to add the layer. |
|
The data is owned by the caller of the function. | |
name |
const gchar* |
The layer name. |
|
The data is owned by the caller of the function. | |
The value is a NUL terminated UTF-8 string. | |
surface |
cairo_surface_t |
A Cairo image surface. |
|
The data is owned by the caller of the function. | |
progress_start |
gdouble |
Start of progress. |
|
progress_end |
gdouble |
End of progress. |
Return value
Returns: | GimpLayer |
The newly created layer. The object belongs to libgimp and you should not free it. |
|
The data is owned by the called function. |