php-图画

      gd库画图
准备画步 //imagecreatetruecolor(宽,高);

准备涂料 //imagecolorallocate(画布,0,0,0);
//imagecolorallocate(画布,255,,25,255):

画图 //背景 imagefill(画布,0,0,涂料);
//区块填充 imagefilledellipse(画布,258,151,200,200,涂料);

输出图 //header("content-type:image/png");

保存图 //imagepng(画布);

关闭画布 //imagedestroy(画布);


 

imagefill(); //区域填充
imagefillipse(); //一个椭圆

imagesetpixel(); //画一个像素
imareline(); //画一条线
imagerectangle(); //一个矩形
imagepolygon(); //一个多边形并填充
imagearc(); //一个椭圆弧
imagestring(); //水平画一行字符串
imagechar(); //水平画一个字符
imagettftext(); //用turetype字符向图像画一个字符串

posted on 2017-03-18 21:16  加号与剑豪  阅读(74)  评论(0编辑  收藏  举报

导航