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。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。