imageellipse

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

imageellipse锟斤拷一锟斤拷锟斤拷圆

说锟斤拷

imageellipse ( resource $image , int $cx , int $cy , int $width , int $height , int $color ) : bool

锟斤拷指锟斤拷锟斤拷锟斤拷锟斤拷锟较伙拷一锟斤拷锟斤拷圆锟斤拷

锟斤拷锟斤拷

image

锟斤拷图锟襟创斤拷锟斤拷锟斤拷(锟斤拷锟斤拷imagecreatetruecolor())锟斤拷锟截碉拷图锟斤拷锟斤拷源锟斤拷

cx

锟叫硷拷锟� X 锟斤拷锟疥。

cy

锟叫硷拷锟� Y 锟斤拷锟疥。

width

锟斤拷圆锟侥匡拷取锟�

height

锟斤拷圆锟侥高度★拷

color

锟斤拷圆锟斤拷锟斤拷色锟斤拷锟斤拷色锟斤拷识锟斤拷锟斤拷 imagecolorallocate() 锟斤拷锟斤拷锟斤拷

锟斤拷锟斤拷值

锟缴癸拷时锟斤拷锟斤拷 TRUE锟斤拷 锟斤拷锟斤拷锟斤拷失锟斤拷时锟斤拷锟斤拷 FALSE锟斤拷

锟斤拷锟斤拷

Example #1 imageellipse() 锟斤拷锟斤拷

<?php

// 锟铰斤拷一锟斤拷锟秸帮拷图锟斤拷
$image imagecreatetruecolor(400300);

// 锟斤拷浔筹拷锟缴�
$bg imagecolorallocate($image000);

// 选锟斤拷锟斤拷圆锟斤拷锟斤拷色
$col_ellipse imagecolorallocate($image255255255);

// 锟斤拷一锟斤拷锟斤拷圆
imageellipse($image200150300200$col_ellipse);

// 锟斤拷锟酵硷拷锟�
header("Content-type: image/png");
imagepng($image);


?>

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

锟斤拷锟斤拷锟斤拷锟斤拷锟� imageellipse()

注锟斤拷

Note:

锟斤拷锟斤拷锟斤拷锟斤拷要 GD 2.0.2 锟斤拷锟斤拷甙姹撅拷锟�

锟轿硷拷