Constructor
GimpTextLayernew
Declaration [src]
GimpTextLayer*
gimp_text_layer_new (
GimpImage* image,
const gchar* text,
const gchar* fontname,
gdouble size,
GimpUnit unit
)
Description [src]
Create a new layer.
This procedure creates a new text layer displaying the specified text
. By
default the width and height of the layer will be determined by the text
contents, the fontname
, size
and unit
.
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. | |
text |
const gchar* |
The text to generate (in UTF-8 encoding). |
|
The data is owned by the caller of the function. | |
The value is a NUL terminated UTF-8 string. | |
fontname |
const gchar* |
The name of the font. |
|
The data is owned by the caller of the function. | |
The value is a NUL terminated UTF-8 string. | |
size |
gdouble |
The size of text in either pixels or points. |
|
unit |
GimpUnit |
The units of specified size. |
Return value
Returns: | GimpTextLayer |
The newly created text layer. The object belongs to libgimp and you should not free it. |
|
The data is owned by the called function. |