PHP imagearc - วีดีโอรูปไข่โค้ง
imagearc - ใช้ในการวาดโค้งรูปไข่
ไวยากรณ์
bool imagearc ( resource $image , int $cx , int $cy , int $w , int $h , int $s , int $e , int $color )
imagearc () เพื่อ CX ภาวะ (บนซ้ายคือ 0, 0) เป็นศูนย์กลางของภาพที่แสดงในภาพวาดโค้งรูปไข่
W และ H ระบุความกว้างวงรีและความสูงที่เริ่มต้นและจุดสิ้นสุดและ E พารามิเตอร์เพื่อระบุมุม 0 °ตั้งอยู่ที่ตำแหน่ง 03:00, ภาพวาดตามเข็มนาฬิกา
ตัวอย่าง
<?php $img = imagecreatetruecolor(200, 200);// 创建一个 200*200 图片 $white = imagecolorallocate($img, 255, 255, 255); // 颜色 // 画椭圆弧 imagearc($img, 140, 75, 50, 50, 0, 360, $white); // 浏览器输出图片 header("Content-type: image/png"); imagepng($img); imagedestroy($img); ?>
ตัวอย่างข้างต้นของภาพออกเป็นดังนี้