<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                企業??AI智能體構建引擎,智能編排和調試,一鍵部署,支持知識庫和私有化部署方案 廣告
                1、PHP繪制空心圓的函數: imageellipse($image, $cx, $cy, $width, $height, $color)。 代碼如下: $img = imagecreatetruecolor(600, 600); $red = imagecolorallocate($img, 255, 255, 255); imagefill($img, 0, 0, $red); $x = imagesx($img); $y = imagesy($img); for($i=0;$i<20;$i++){ imageellipse($img, mt_rand(0,$x), mt_rand(0,$y), 200, 200, imagecolorallocate($img, mt_rand(0,255), mt_rand(0,255), mt_rand(0,255))); } header('Content-type:image/jpeg'); imagejpeg($img); 效果圖如下: ![](https://box.kancloud.cn/39556da8eb4f29b079bb2215f5f2cecd_567x442.jpg =500x400) 2、PHP繪制實心圓圖像: imagefilledellipse($image, $cx, $cy, $width, $height, $color)。 代碼如下: $img = imagecreatetruecolor(600, 600); $red = imagecolorallocate($img, 255, 0, 0); imagefill($img, 0, 0, $red); $x = imagesx($img); $y = imagesy($img); for($i=0;$i<40;$i++){ imagefilledellipse($img, mt_rand(0,$x), mt_rand(0,$y), 200, 200, imagecolorallocate($img, mt_rand(0,255), mt_rand(0,255), mt_rand(0,255))); } header('Content-type:image/jpeg'); imagejpeg($img); 效果圖如下: ![](https://box.kancloud.cn/a01792d4bcc54afe6a746d66d4fe3131_589x462.jpg =500x400) 3、PHP繪制圓弧線條: imagearc($image, $cx, $cy, $width, $height, $start, $end, $color)。 注意:0度是3點鐘方向! 代碼如下: $img = imagecreatetruecolor(600, 600); $white = imagecolorallocate($img, 255, 255, 255); imagefill($img, 0, 0, $white); imagearc($img, 300, 300, 100, 100, 0, 90, imagecolorallocate($img, 255, 0, 0)); header('Content-type:image/jpeg'); imagejpeg($img); 效果圖如下: ![](https://box.kancloud.cn/553fdc04150ed4324bac6f2bfb4d12ea_343x239.jpg =500x400) 4、PHP繪制實心圓弧(餅狀圖): imagefilledarc($image, $cx, $cy, $width, $height, $start, $end, $color, $style)。 代碼如下: $img = imagecreate(600, 600); imagefill($img, 0, 0, imagecolorallocate($img, 255, 255, 255)); imagefilledarc($img, 300, 300, 200, 200, 0, 90, imagecolorallocate($img, 255, 255, 0), IMG_ARC_PIE); imagefilledarc($img, 300, 300, 200, 200, 90, 180, imagecolorallocate($img, 255, 0, 255), IMG_ARC_PIE); imagefilledarc($img, 300, 300, 200, 200, 180, 360, imagecolorallocate($img, 0, 255, 255), IMG_ARC_PIE); header('Content-type:image/jpeg'); imagejpeg($img); 效果圖如下: ![](https://box.kancloud.cn/99939d1118c1ada92c9b44bfaadf6a97_383x284.jpg =500x400) 5、小實例,繪制一個數據統計餅狀圖: 代碼如下: $messageArry = array('百度'=>'200','阿里巴巴'=>'300','騰訊'=>'400','聯想'=>'230'); $img = imagecreate(600, 600); imagefill($img, 0, 0, imagecolorallocate($img, 255, 255, 255)); $r1 = $r2 = $num = 0; foreach($messageArry as $k=>$v){ $r1 = $num==0 ? 0 : $r2; $r2 = $r1==0 ? ($v/array_sum($messageArry))*360 : ($v/array_sum($messageArry))*360+$r1; $r2 = min(360,ceil($r2)); imagefilledarc($img, 300, 300, 200, 200, $r1, $r2, imagecolorallocate($img, mt_rand(0,255), mt_rand(0,255), mt_rand(0,255)), IMG_ARC_PIE); $num+=1; } header('Content-type:image/jpeg'); imagejpeg($img); 效果圖如下: ![](https://box.kancloud.cn/ffe38333b80eac4e3b9aa357575d4c64_341x272.jpg =500x400)
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看