zoukankan      html  css  js  c++  java
  • 用PHP的GD库画五星红旗来玩玩


    1
    header("Content-Type:image/jpeg"); 2 $img=imagecreatetruecolor(999,667); 3 $color=imagecolorallocate($img,197,0,0); 4 $star_col=imagecolorallocate($img,255,242,0); 5 imagefill($img,0,0,$color); 6 //大星星 7 $big_star=[166,68,189,136,260,136,203,179,227,247,166,206,109,246,129,179,72,136,143,136,166,68]; 8 //二星星 9 $smal_star1=[345,38,343,60,364,69,343,75,340,97,326,79,305,83,318,65,308,47,329,54,435,38]; 10 $smal_star2=[385,105,402,121,422,111,412,133,426,148,405,146,392,166,389,143,367,138,388,128,385,105]; 11 $smal_star3=[398,201,406,223,428,223,412,237,418,258,399,247,379,261,387,239,367,224,391,224,398,201]; 12 $smal_star4=[343,270,344,292,367,301,343,308,342,329,328,312,305,318,318,299,308,280,328,287,343,271]; 13 14 imagefilledpolygon($img,$big_star,10,$star_col); 15 imagefilledpolygon($img,$smal_star1,10,$star_col); 16 imagefilledpolygon($img,$smal_star2,10,$star_col); 17 imagefilledpolygon($img,$smal_star3,10,$star_col); 18 imagefilledpolygon($img,$smal_star4,10,$star_col); 19 20 imagepng($img); 21 imagedestroy($img);

    
    
  • 相关阅读:
    分红
    MyCat学习笔记
    vue 事例
    linux 端口
    vue安装
    react入门一(转)
    javascript 中各种继承方式的优缺点 (转)
    vue路由复习(转载)
    ES6新特性
    js面试中长见的算法题(转载)
  • 原文地址:https://www.cnblogs.com/adstat/p/8204429.html
Copyright © 2011-2022 走看看