php中用gd库怎么做出太极的图案,求代码
2个回答
展开全部
看代码
<?php
$w = 500;
$h = 500;
$img = imageCreate($w,$h);
imageColorAllocate($img,230,230,230);
$white = imageColorAllocate($img,255,255,255);
$black = imageColorAllocate($img,0,0,0);
imageFilledArc($img,250,250,500,500,0,360,$black,IMG_ARC_PIE);
imageFilledArc($img,250,250,500,500,90,270,$white,IMG_ARC_PIE);
imageFilledArc($img,250,375,250,250,0,360,$black,IMG_ARC_PIE);
imageFilledArc($img,250,125,250,250,0,360,$white,IMG_ARC_PIE);
imageFilledArc($img,250,375,50,50,0,360,$white,IMG_ARC_PIE);
imageFilledArc($img,250,125,50,50,0,360,$black,IMG_ARC_PIE);
header("content-type:image/png");
imagePNG($img);
?>
这是我刚发布的,带注释的
http://www.xstnet.com/article-77.html
这是效果图
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询