• <sub id="h4knl"><ol id="h4knl"></ol></sub>
    <sup id="h4knl"></sup>
      <sub id="h4knl"></sub>

      <sub id="h4knl"><ol id="h4knl"><em id="h4knl"></em></ol></sub><s id="h4knl"></s>
      1. <strong id="h4knl"></strong>

      2. 做出PHP數(shù)據(jù)餅圖

        時間:2024-10-21 21:50:33 PHP 我要投稿
        • 相關(guān)推薦

        做出PHP數(shù)據(jù)餅圖

          《如何做出PHP數(shù)據(jù)餅圖》特別為需要編程學(xué)習(xí)的朋友收集整理的,僅供參考。內(nèi)容如下:

          用PHP做出的動態(tài)頁面與其他的編程語言相比,PHP是將程序嵌入到HTML(標(biāo)準(zhǔn)通用標(biāo)記語言下的一個應(yīng)用)文檔中去執(zhí)行,執(zhí)行效率比完全生成HTML標(biāo)記的CGI要高許多;PHP還可以執(zhí)行編譯后代碼,編譯可以達到加密和優(yōu)化代碼運行,使代碼運行更快。下面是小編為大家搜索整理的如何做出PHP數(shù)據(jù)餅圖,希望大家能有所收獲,更多精彩內(nèi)容請及時關(guān)注我們考試網(wǎng)!

          源代碼:

          //+------------------------+

          //| pie3dfun.PHP//公用函數(shù) |

          //+------------------------+

          define("ANGLE_STEP", 5); //定義畫橢圓弧時的角度步長

          function draw_getdarkcolor($img,$clr) //求$clr對應(yīng)的暗色

          {

          $rgb = imagecolorsforindex($img,$clr);

          return array($rgb["red"]/2,$rgb["green"]/2,$rgb["blue"]/2);

          }

          function draw_getexy($a, $b, $d) //求角度$d對應(yīng)的橢圓上的點坐標(biāo)

          {

          $d = deg2rad($d);

          return array(round($a*Cos($d)), round($b*Sin($d)));

          }

          function draw_arc($img,$ox,$oy,$a,$b,$sd,$ed,$clr) //橢圓弧函數(shù)

          {

          $n = ceil(($ed-$sd)/ANGLE_STEP);

          $d = $sd;

          list($x0,$y0) = draw_getexy($a,$b,$d);

          for($i=0; $i<$n; $i++)

          {

          $d = ($d+ANGLE_STEP)>$ed?$ed:($d+ANGLE_STEP);

          list($x, $y) = draw_getexy($a, $b, $d);

          imageline($img, $x0+$ox, $y0+$oy, $x+$ox, $y+$oy, $clr);

          $x0 = $x;

          $y0 = $y;

          }

          }

          function draw_sector($img, $ox, $oy, $a, $b, $sd, $ed, $clr) //畫扇面

          {

          $n = ceil(($ed-$sd)/ANGLE_STEP);

          $d = $sd;

          list($x0,$y0) = draw_getexy($a, $b, $d);

          imageline($img, $x0+$ox, $y0+$oy, $ox, $oy, $clr);

          for($i=0; $i<$n; $i++)

          {

          $d = ($d+ANGLE_STEP)>$ed?$ed:($d+ANGLE_STEP);

          list($x, $y) = draw_getexy($a, $b, $d);

          imageline($img, $x0+$ox, $y0+$oy, $x+$ox, $y+$oy, $clr);

          $x0 = $x;

          $y0 = $y;

          }

          imageline($img, $x0+$ox, $y0+$oy, $ox, $oy, $clr);

          list($x, $y) = draw_getexy($a/2, $b/2, ($d+$sd)/2);

        【做出PHP數(shù)據(jù)餅圖】相關(guān)文章:

        關(guān)于php面試寶典及PHP面試技巧08-16

        做出簡化設(shè)計的技巧09-08

        PHP的壓縮函數(shù)06-21

        教你怎樣做出松軟的面包10-18

        php高級教程01-23

        怎樣做出最好吃的包子07-31

        怎樣做出美味健康壽司05-19

        糕點做法-飛餅版雞蛋灌餅09-27

        榴蓮餅的做法08-04

        雞蛋餅的做法06-04

        国产高潮无套免费视频_久久九九兔免费精品6_99精品热6080YY久久_国产91久久久久久无码
      3. <sub id="h4knl"><ol id="h4knl"></ol></sub>
        <sup id="h4knl"></sup>
          <sub id="h4knl"></sub>

          <sub id="h4knl"><ol id="h4knl"><em id="h4knl"></em></ol></sub><s id="h4knl"></s>
          1. <strong id="h4knl"></strong>

          2. 中文字幕波多野结衣丝袜 | 亚洲色大成网站韩国黄 | 限制级福利影院在线观看 | 欧美婷婷开心五月综合视频 | 一本之道高清乱码久久久 | 女教师巨大乳孔中文字幕 |