php gd库 imagettftext

array imagettftext ( resource $image , float $size , float $angle , int $x , int $y , int $color , string $fontfile ,string $text )

image

An image resource, returned by one of the image creation functions, such as imagecreatetruecolor().

size

The font size. Depending on your version of GD, this should be specified as the pixel size (GD1) or point size (GD2).

angle

The angle in degrees, with 0 degrees being left-to-right reading text. Higher values represent a counter-clockwise rotation. For example, a value of 90 would result in bottom-to-top reading text.

x

The coordinates given by x and y will define the basepoint of the first character (roughly the lower-left corner of the character). This is different from the imagestring(), where x and y define the upper-left corner of the first character. For example, "top left" is 0, 0.

y

y座标设定字体baseline,并不是字符的底部。

color

The color index. Using the negative of a color index has the effect of turning off antialiasing. Seeimagecolorallocate().

fontfile

 

text

The text string in UTF-8 encoding.

 

 

此处评论已关闭