PHP imagearc β Draw Elliptical Arc |
-- Learning is not just about technology, but also about dreams!
- Home
- HTML
- JavaScript
- CSS
- Vue
- React
- Python3
- Java
- C
- C++
- C#
- AI
- Go
- SQL
- Linux
- VS Code
- Bootstrap
- Git
- Local Bookmarks
PHP Tutorial
PHP Tutorial PHP Introduction PHP Installation PHP Syntax PHP Variables PHP echo/print PHP EOF(heredoc) PHP Data Types PHP Type Comparison PHP Constants PHP String PHP Operators PHP If...Else PHP Switch PHP Arrays PHP Array Sorting PHP Superglobals PHP While Loop PHP For Loop PHP Functions PHP Magic Constants PHP Namespaces PHP OOP PHP Quiz
PHP Forms
PHP Forms PHP Form Validation PHP Form - Required Fields PHP Form - Validate Email and URL PHP Complete Form Example PHP $_GET Variable PHP $_POST Variable
PHP Advanced Tutorial
PHP Multidimensional Arrays PHP Date PHP Include PHP File PHP File Upload PHP Cookie PHP Session PHP E-mail PHP Secure E-mail PHP Error PHP Exception PHP Filters PHP Advanced Filters PHP JSON
PHP 7 New Features
PHP Database
PHP MySQL Introduction PHP MySQL Connect PHP MySQL Create Database PHP MySQL Create Table PHP MySQL Insert Data PHP MySQL Insert Multiple Data PHP MySQL Prepared Statements PHP MySQL Read Data PHP MySQL Where PHP MySQL Order By PHP MySQL Update PHP MySQL Delete PHP ODBC
PHP XML
XML Expat Parser XML DOM XML SimpleXML
PHP and AJAX
AJAX Introduction AJAX PHP AJAX Database AJAX XML AJAX Live Search AJAX RSS Reader AJAX Poll
PHP Reference
PHP Array PHP Calendar PHP cURL PHP Date PHP Directory PHP Error PHP Filesystem PHP Filter PHP FTP PHP HTTP PHP Libxml PHP Mail PHP Math PHP Misc PHP MySQLi PHP PDO PHP SimpleXML PHP String PHP XML PHP Zip PHP Timezones PHP Image Processing PHP RESTful PHP PCRE PHP Available Functions PHP Composer
Explore Further
- Computer Science
- Scripting Languages
- Scripts
- Web Service
- Web Design & Development
- Development Tools
- Programming
- Programming Languages
- Web Services
- Software
PHP imagearc - Draw Elliptical Arc
imagearc β Used to draw an elliptical arc.
Syntax
bool imagearc ( resource $image , int $cx , int $cy , int $w , int $h , int $s , int $e , int $color )
imagearc() draws an elliptical arc on the image represented by $image, with the center at ($cx, $cy) (the top-left corner of the image is 0, 0).
$w and $h specify the width and height of the ellipse, respectively. The start and end points are specified by the $s and $e parameters in degrees. 0Β° is at the 3 o'clock position, and the arc is drawn clockwise.
Example
<?php
$img = imagecreatetruecolor(200, 200); // Create a 200x200 image
$white = imagecolorallocate($img, 255, 255, 255); // Color
// Draw an elliptical arc
imagearc($img, 140, 75, 50, 50, 0, 360, $white);
// Output the image in the browser
header("Content-type: image/png");
imagepng($img);
imagedestroy($img);
?>
The output image of the above example is as follows:
YouTip