函数名: ImagickDraw::getFontStretch()
适用版本: Imagick 3.0.0 或更高版本
用法: getFontStretch() 方法用于获取当前 ImagickDraw 对象的字体拉伸属性。字体拉伸属性定义了字体在水平方向上的拉伸程度。该方法不接受任何参数。
示例:
// 创建 ImagickDraw 对象
$draw = new ImagickDraw();
// 设置字体拉伸属性为 "normal"
$stretch = $draw->getFontStretch();
echo "当前字体拉伸属性: " . $stretch . "\n";
// 输出结果:当前字体拉伸属性: normal
注意:在使用该方法之前,需要确保已经安装了 Imagick 扩展,并且版本符合要求。