網頁設計 php繪制一個扇形的方法?
php繪制一個扇形的方法?代碼示例:<?PHP//1。Create canvas$im=imagecreatetruecolor(300200)//創(chuàng)建新的真彩色圖像。默認背景為黑色,并返回圖像標
php繪制一個扇形的方法?
代碼示例:
<?PHP
//1。Create canvas
$im=imagecreatetruecolor(300200)//創(chuàng)建新的真彩色圖像。默認背景為黑色,并返回圖像標識符。不建議使用另一個函數(shù)imagecreate。
//2. 繪制所需圖像
$red=imagecolorallocate($IM,255,0,0)//創(chuàng)建一個顏色
imagefilledarc($IM,100,80120,90,0120,$red,imgu3)。Output image
標題(“content type:image/png”)
imagepng($IM)//輸出到頁面。如果有第二個參數(shù)[,$filename],則表示保存圖像
//4。銷毀圖像并釋放內存
imagedestroy($IM)]?&燃氣輪機