📄 test.php
字号:
<?php
// this example is provided by poxy at klam dot
// create image
$image =imagecreate(100, 100);
// allocate some solors
$white = imagecolorallocate($image, 0xFF, 0xFF, 0xFF);
$gray = imagecolorallocate($image, 0xC0, 0xC0, 0xC0);
$gray = imagecolorallocate($image, 0xC0, 0xC0, 0xC0);
$darkgray = imagecolorallocate($image, 0x90, 0x90, 0x90);
$navy = imagecolorallocate($image, 0x80, 0x20, 0x20);
$darknavy = imagecolorallocate($image, 0x70, 0x20, 0x20);
$red = imagecolorallocate($image, 0xD0, 0x50, 0x50);
$darkred = imagecolorallocate($image, 0xC0, 0x40, 0x40);
$reda = imagecolorallocate($image, 0xB0, 0x70, 0x70);
$darkreda = imagecolorallocate($image, 0xA0, 0x60, 0x60);
// make the 3D effect
for ($i = 60; $i > 50; $i--) {
imagefilledarc($image, 50, $i, 100, 50, 0, 45, $darknavy, IMG_ARC_PIE);
imagefilledarc($image, 50, $i, 100, 50, 45, 75 , $darkgray, IMG_ARC_PIE);
imagefilledarc($image, 50, $i, 100, 50, 75, 120 , $darkred, IMG_ARC_PIE);
imagefilledarc($image, 50, $i, 100, 50, 120, 360 , $darkreda, IMG_ARC_PIE);
}
imagefilledarc($image, 50, 50, 100, 50, 0, 45, $navy, IMG_ARC_PIE);
imagefilledarc($image, 50, 50, 100, 50, 45, 75 , $gray, IMG_ARC_PIE);
imagefilledarc($image, 50, 50, 100, 50, 75, 120 , $red, IMG_ARC_PIE);
imagefilledarc($image, 50, 50, 100, 50, 120, 360 , $reda, IMG_ARC_PIE);
// flush image
header('Content-type: image/png');
imagepng($image);
imagedestroy($image);
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -