Goto main content

gd_print

Print a text in the image.

GD_PRINT

NAME

gd_print - Prints a text in the image.

SYNOPSIS

gd_print (gd:variable, color:"string", x:integer, y:integer, angle:double, size:double, linespacing:double, font:"string", string:"string");

DESCRIPTION

This function is used to print a text in the image.

PARAMETERS

gd
Variable must hold a returned value from gd_new.
color
A color in the format #000000 or #255,255,255.
coloridx
Color index from get_color.
x,y
Coordinate in the image.
angle
Angle in degree when printing text.
size
Size of text.
linespacing
Linespacing between newline. By default, it is set to 1.05.
string
String to print.
font
Fontfile.

RETURN

Bounding box array for the print:
0 lower left corner, X position 1 lower left corner, Y position 2 lower right corner, X position 3 lower right corner, Y position 4 upper right corner, X position 5 upper right corner, Y position 6 upper left corner, X position 7 upper left corner, Y position

MODULES

To use this module, you must specify the following in /usr/local/website/site.conf:

Module gd {
        Library : "/usr/local/lib/libsngd.so"
        Init : "sngd_init"
}

EXAMPLES

gd_print(gd:im, x:100, y:100, coloridx:color, str:"Version: 1", size:24);

SEE ALSO

AUTHOR

Written by Pierre Laplante and Caroline Laplante, <laplante@sednove.com>

MODIFICATIONS

1.0 2014-09-09 21:24:14 laplante@sednove.com

Edit

© 2024 extenso Inc. All rights reserved.