php結(jié)合redis高并發(fā)下發(fā)帖、發(fā)微博的實(shí)現(xiàn)方法
676
2024-01-18
(PHP 4, PHP 5)
imagepolygon — 畫一個(gè)多邊形
$image
, array $points
, int $num_points
, int $color
)
imagepolygon() 在圖像中創(chuàng)建一個(gè)多邊形。points
是一個(gè) PHP 數(shù)組,包含了多邊形的各個(gè)頂點(diǎn)坐標(biāo),即 points[0]
= x0,points[1] = y0,points[2]
= x1,points[3] = y1,以此類推。num_points
是頂點(diǎn)的總數(shù)。
Example #1 imagepolygon() 例子
<?php
// create a blank image
$image = imagecreatetruecolor(400, 300);
// fill the background color
$bg = imagecolorallocate($image, 0, 0, 0);
// choose a color for the polygon
$col_poly = imagecolorallocate($image, 255, 255, 255);
// draw the polygon
imagepolygon($image,
array (
0, 0,
100, 200,
300, 200
),
3,
$col_poly);
// output the picture
header("Content-type: image/png");
imagepng($image);
?>
參見 imagecreate() 和 imagecreatetruecolor()。
#免責(zé)聲明#
本站[綠夏技術(shù)導(dǎo)航]提供的一切軟件、教程和內(nèi)容信息僅限用于學(xué)習(xí)和研究目的;不得將上述內(nèi)容用于商業(yè)或者非法用途,否則,一切后果請(qǐng)用戶自負(fù)。本站信息來自網(wǎng)絡(luò)收集整理,版權(quán)爭(zhēng)議與本站無關(guān)。您必須在下載后的24個(gè)小時(shí)之內(nèi),從您的電腦或手機(jī)中徹底刪除上述內(nèi)容。如果您喜歡該程序或內(nèi)容,請(qǐng)支持正版,購買注冊(cè),得到更好的正版服務(wù)。我們非常重視版權(quán)問題,如有侵權(quán)請(qǐng)郵件[admin@lxwl520.com]與我們聯(lián)系進(jìn)行刪除處理。敬請(qǐng)諒解!