imagesetthickness

(PHP 4 >= 4.0.6, PHP 5, PHP 7)

imagesetthickness锟借定锟斤拷锟竭的匡拷锟�

说锟斤拷

imagesetthickness ( resource $image , int $thickness ) : bool

imagesetthickness() 锟窖伙拷锟斤拷锟轿o拷锟斤拷锟斤拷危锟斤拷锟皆诧拷鹊锟绞憋拷锟斤拷玫锟斤拷呖锟斤拷锟轿� 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(200100);
$white imagecolorallocate($im0xFF0xFF0xFF);
$black imagecolorallocate($im0x000x000x00);

// Set the background to be white
imagefilledrectangle($im0029999$white);

// Set the line thickness to 5
imagesetthickness($im5);

// Draw the rectangle
imagerectangle($im141418585$black);

// Output image to the browser
header('Content-Type: image/png');

imagepng($im);
imagedestroy($im);
?>

锟斤拷锟斤拷锟斤拷锟教碉拷锟斤拷锟斤拷锟斤拷锟斤拷冢锟�

Output of example : imagesetthickness()

注锟斤拷

Note: 锟剿猴拷锟斤拷锟斤拷要 GD 2.0.1 锟斤拷锟斤拷甙姹�(锟狡硷拷 2.0.28 锟斤拷锟斤拷锟竭版本)锟斤拷