Home  >  Article  >  Backend Development  >  php imagettftext()函数里面的x、y参数分别是什么?

php imagettftext()函数里面的x、y参数分别是什么?

WBOY
WBOYOriginal
2016-06-06 20:50:211510browse

在网上查了下,有说是左上角所在的左边,有说是右下角所在的坐标,手册上说:

x
由 x,y 所表示的坐标定义了第一个字符的基本点(大概是字符的左下角)。这和 imagestring() 不同,其 x,y 定义了第一个字符的左上角。例如 "top left" 为 0, 0。

y
Y 坐标。它设定了字体基线的位置,不是字符的最底端。

==。自己测试了几个,总感觉不对的样子,我已经浑掉了。。请教各位,这x/y到底是什么?

附:imagettftext函数

回复内容:

在网上查了下,有说是左上角所在的左边,有说是右下角所在的坐标,手册上说:

x
由 x,y 所表示的坐标定义了第一个字符的基本点(大概是字符的左下角)。这和 imagestring() 不同,其 x,y 定义了第一个字符的左上角。例如 "top left" 为 0, 0。

y
Y 坐标。它设定了字体基线的位置,不是字符的最底端。

==。自己测试了几个,总感觉不对的样子,我已经浑掉了。。请教各位,这x/y到底是什么?

附:imagettftext函数

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn