imageellipse() পিএইচপি-তে একটি অন্তর্নির্মিত ফাংশন যা একটি উপবৃত্ত আঁকতে ব্যবহৃত হয়। এটি সাফল্যের উপর সত্য এবং ব্যর্থতার উপর মিথ্যা ফেরত দেয়।
সিনট্যাক্স
Bool imageellipse($image, $cx, $cy, $width, $height, $color)
পরামিতি
imageellipse() ছয়টি ভিন্ন প্যারামিটার লাগে:$image , $cx , $cy , $প্রস্থ , $উচ্চতা , $color .
-
$ছবি - চিত্রের আকার তৈরি করে। এটি ইমেজ তৈরির ফাংশনগুলির একটি দ্বারা ফেরত দেওয়া হয়, যেমন imagecreatetruecolor().
-
$cx − কেন্দ্রের এক্স-অর্ডিনেট সেট করে।
-
$cy − কেন্দ্রের y-অর্ডিনেট সেট করে।
-
$প্রস্থ - উপবৃত্তাকার প্রস্থ সেট করে।
-
$উচ্চতা − উপবৃত্তের উচ্চতা সেট করে।
-
$color - উপবৃত্তের রঙ সেট করে। imagecolorallocate() ফাংশন দ্বারা তৈরি একটি রঙ শনাক্তকারী।
রিটার্ন মান
এটি সাফল্যের উপর সত্য এবং ব্যর্থতার উপর মিথ্যা ফেরত দেয়।
উদাহরণ 1
<?php
// Create a blank image.
$image = imagecreatetruecolor(700, 350);
// Select the background color.
$bg = imagecolorallocate($image, 0, 0, 0);
// Fill the background with the color selected above.
imagefill($image, 0, 0, $bg);
// Choose a color for the ellipse.
$col_ellipse = imagecolorallocate($image, 255, 255, 255);
// Draw the ellipse.
imageellipse($image, 325, 175, 500, 175, $col_ellipse);
// Output the image.
header("Content-type: image/png");
imagepng($image);
?> আউটপুট

উদাহরণ 2
<?php
//It creates the blank image or size of the image.
$image = imagecreatetruecolor(700, 600);
//Set the background color of the image.
$bg = imagecolorallocate($image, 122, 122, 122);
//Fill background with the above-selected color.
imagefill($image, 0, 0, $bg);
// set color of the ellipse.
$col_ellipse = imagecolorallocate($image, 0, 255, 255);
// Function to draw the ellipse.
imageellipse($image, 250, 300, 300, 550, $col_ellipse);
// Output of the image.
header("Content-type: image/gif");
imagepng($image);
?> আউটপুট
