ImagickDraw::getStrokeWidth() 函数是 PHP 的内置函数,用于返回用于绘制对象轮廓的笔划宽度。
用法:
float ImagickDraw::getStrokeWidth( void )
参数:该函数不接受任何参数。
返回值:此函数在成功时返回笔画宽度。
错误/异常:它会在出错时抛出 ImagickException。
以下示例程序旨在说明 PHP 中的 ImagickDraw::getStrokeWidth() 函数:
程序:
<?php
// Create an ImagickDraw object
$draw = new \ImagickDraw();
// Set the Stroke Color
$draw->setStrokeColor('Green');
// Set the Fill Color
$draw->setFillColor('Red');
// Set the stroke opacity
$draw->setStrokeOpacity(0.5);
// Draw the rectangle
$draw->rectangle(40, 30, 200, 260);
// Set the stroke width
$draw->setStrokeWidth(7);
// Display the StrokeWidth
echo $draw->getStrokeWidth();
?>
输出:
7
相关用法
- PHP GmagickDraw getstrokewidth()用法及代码示例
- PHP ImagickDraw getTextAlignment()用法及代码示例
- PHP ImagickDraw polygon()用法及代码示例
- PHP ImagickDraw roundRectangle()用法及代码示例
- PHP ImagickDraw arc()用法及代码示例
- PHP ImagickDraw circle()用法及代码示例
- PHP ImagickDraw bezier()用法及代码示例
- PHP ImagickDraw rectangle()用法及代码示例
- PHP ImagickDraw line()用法及代码示例
- PHP ImagickDraw point()用法及代码示例
- PHP ImagickDraw skewX()用法及代码示例
- PHP ImagickDraw setStrokeWidth()用法及代码示例
- PHP ImagickDraw translate()用法及代码示例
- PHP ImagickDraw setStrokeOpacity()用法及代码示例
- PHP ImagickDraw setGravity()用法及代码示例
- PHP ImagickDraw setFillColor()用法及代码示例
- PHP ImagickDraw setFont()用法及代码示例
- PHP ImagickDraw setFontStyle()用法及代码示例
- PHP ImagickDraw setFontSize()用法及代码示例
- PHP ImagickDraw setFontWeight()用法及代码示例
- PHP ImagickDraw setStrokeMiterLimit()用法及代码示例
- PHP ImagickDraw setFillOpacity()用法及代码示例
- PHP ImagickDraw setTextAntialias()用法及代码示例
- PHP ImagickDraw setTextDecoration()用法及代码示例
注:本文由纯净天空筛选整理自sarthak_ishu11大神的英文原创作品 PHP | ImagickDraw getStrokeWidth() Function。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。