PHP異常處理:error_get_last()函數的用法
763
2023-12-14
(PHP 4 >= 4.0.6, PHP 5)
imagesetthickness — 設定畫線的寬度
$image
, int $thickness
)
imagesetthickness()
把畫矩形,多邊形,橢圓等等時所用的線寬設為
thickness
個像素。成功時返回 TRUE
, 或者在失敗時返回 FALSE
。
Note: 此函數需要 GD 2.0.1 或更高版本(推薦 2.0.28 及更高版本)。
image
由圖象創建函數(例如imagecreatetruecolor())返回的圖象資源。
thickness
Thickness, in pixels.
成功時返回 TRUE
, 或者在失敗時返回 FALSE
。
Example #1 imagesetthickness() example
<?php
// Create a 200x100 image
$im = imagecreatetruecolor(200, 100);
$white = imagecolorallocate($im, 0xFF, 0xFF, 0xFF);
$black = imagecolorallocate($im, 0x00, 0x00, 0x00);
// Set the background to be white
imagefilledrectangle($im, 0, 0, 299, 99, $white);
// Set the line thickness to 5
imagesetthickness($im, 5);
// Draw the rectangle
imagerectangle($im, 14, 14, 185, 85, $black);
// Output image to the browser
header('Content-Type: image/png');
imagepng($im);
imagedestroy($im);
?>
以上例程的輸出類似于:
Note: 此函數需要 GD 2.0.1 或更高版本(推薦 2.0.28 及更高版本)。
#免責聲明#
本站[綠夏技術導航]提供的一切軟件、教程和內容信息僅限用于學習和研究目的;不得將上述內容用于商業或者非法用途,否則,一切后果請用戶自負。本站信息來自網絡收集整理,版權爭議與本站無關。您必須在下載后的24個小時之內,從您的電腦或手機中徹底刪除上述內容。如果您喜歡該程序或內容,請支持正版,購買注冊,得到更好的正版服務。我們非常重視版權問題,如有侵權請郵件[admin@lxwl520.com]與我們聯系進行刪除處理。敬請諒解!