TextLayer


Description:

[ CCode ( has_construct_function = false ) ]
[ Version ( since = "2.6" ) ]
public TextLayer (Image image, string text, Font font, double size, Unit unit)

Creates a new text 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 font, 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 [method@Image.insert_layer] method.

The arguments are kept as simple as necessary for the basic case. All text attributes, however, can be modified with the appropriate `gimp_text_layer_set_*()` procedures.

Parameters:

image

The image.

text

The text to generate (in UTF-8 encoding).

font

The font to write the text with.

size

The size of text in either pixels or points.

unit

The units of specified size.

Returns:

The new text layer. The object belongs to libgimp and you should not free it.