牛牛在线工具

ImagickDraw::getStrokeWidth()

收录 8868 个 PHP 函数,含用途说明与用法示例。

ImagickDraw::getStrokeWidth()

获取 ImagickDraw 对象的描边宽度

函数:ImagickDraw::getStrokeWidth() 适用版本:Imagick 2.0.0及以上版本 用法:getStrokeWidth() 方法用于获取 ImagickDraw 对象的描边宽度。 语法:float ImagickDraw::getStrokeWidth( void ) 参数:无 返回值:返回一个浮点数,表示当前 ImagickDraw 对象的描边宽度。 示例: // 创建一个 ImagickDraw 对象 $draw = new ImagickDraw(); // 设置描边宽度为2 $draw->setStrokeWidth(2); // 获取当前描边宽度 $strokeWidth = $draw->getStrokeWidth(); echo "当前描边宽度为:{$strokeWidth}"; 输出: 当前描边宽度为:2 注意:在使用该函数之前,需要确保已经安装了 Imagick 扩展,并且启用了 ImagickDraw 类。