imageellipse()
ImageEllipse () 함수는 6 개의 매개 변수를 수락합니다.
함수가 성공적으로 실행될 때 true를 반환하고 실패하면 False가 있습니다 .
<?php
// 빈 이미지를 만듭니다
$image = imagecreatetruecolor(700, 350);
// 배경색을 선택하십시오
$bg = imagecolorallocate($image, 0, 0, 0);
// 배경색을 채우십시오
imagefill($image, 0, 0, $bg);
// 타원의 색상을 선택하십시오
$col_ellipse = imagecolorallocate($image, 255, 255, 255);
// 타원을 그립니다
imageellipse($image, 325, 175, 500, 175, $col_ellipse);
// 출력 이미지
header("Content-type: image/png");
imagepng($image);
?>
<?php
// 빈 이미지를 만듭니다
$image = imagecreatetruecolor(700, 600);
// 배경색을 설정하십시오
$bg = imagecolorallocate($image, 122, 122, 122);
// 배경색을 채우십시오
imagefill($image, 0, 0, $bg);
// 타원의 색상을 설정하십시오
$col_ellipse = imagecolorallocate($image, 0, 255, 255);
// 타원을 그립니다
imageellipse($image, 250, 300, 300, 550, $col_ellipse);
// 출력 이미지
header("Content-type: image/gif");
imagepng($image);
?>
위의 두 가지 예를 통해 PHP에서 ImageEllipse () 함수를 사용하여 타원을 그리는 방법을 보여줍니다. 이 기능은 그래픽 처리 응용 프로그램 및 웹 개발 모두에서 다양한 이미지 그리기 작업에 적합합니다.