close

 

說明

bool imagefilledellipse ( resource $image , int $cx , int $cy , int $width , int $height , int $color )
畫一橢圓並填充到指定的 image。

參數

image
由圖象創建函數(例如imagecreatetruecolor())返回的圖象資源。

cx
中央的 x 坐標。

cy
中央的 y 坐標。

width
橢圓的寬度。

height
橢圓的高度。

color
要填充的顏色。顏色標識由函數 imagecolorallocate() 創建。


例子

<?php

// create a blank image
$image = imagecreatetruecolor(400, 300);

// fill the background color
$bg = imagecolorallocate($image, 0, 0, 0);

// choose a color for the ellipse
$col_ellipse = imagecolorallocate($image, 255, 255, 255);

// draw the white ellipse
imagefilledellipse($image, 200, 150, 300, 200, $col_ellipse);

// output the picture
header("Content-type: image/png");
imagepng($image);

?>

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 stockwfj3 的頭像
    stockwfj3

    程式設計@筆記

    stockwfj3 發表在 痞客邦 留言(0) 人氣()