Constructor
GimpLayernew
Declaration [src]
GimpLayer*
gimp_layer_new (
GimpImage* image,
const gchar* name,
gint width,
gint height,
GimpImageType type,
gdouble opacity,
GimpLayerMode mode
)
Description [src]
Create a new layer.
This procedure creates a new layer with the specified width, height,
and type. Name, opacity, and mode are also supplied parameters. The
new layer still needs to be added to the image, as this is not
automatic. Add the new layer with the gimp_image_insert_layer()
command. Other attributes such as layer mask modes, and offsets
should be set with explicit procedure calls.
Available since: | 3.0 |
Parameters
image |
GimpImage |
The 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. | |
width |
gint |
The layer width. |
|
height |
gint |
The layer height. |
|
type |
GimpImageType |
The layer type. |
|
opacity |
gdouble |
The layer opacity. |
|
mode |
GimpLayerMode |
The layer combination mode. |
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. |