Php 用png图像替换imagettftext抓取的字符

Php 用png图像替换imagettftext抓取的字符,php,image,Php,Image,我的代码将每个行星的标志符号放置在用php绘制的星盘上。字形是在imagettftext中用“chr”命名的字符,但我认为使用png图像来表示行星会更有趣。你能帮忙吗 // here is the 'chr' for each planet $pl_glyph[0] = 81; $pl_glyph[1] = 87; $pl_glyph[2] = 69; // display the planet in the wheel $angle_to_us

我的代码将每个行星的标志符号放置在用php绘制的星盘上。字形是在imagettftext中用“chr”命名的字符,但我认为使用png图像来表示行星会更有趣。你能帮忙吗

    // here is the 'chr' for each planet
    $pl_glyph[0] = 81;
    $pl_glyph[1] = 87;
    $pl_glyph[2] = 69;

    // display the planet in the wheel
    $angle_to_use = deg2rad($angle_to_use);

    if ($flag == False)
    {
      display_planet_glyph($angle_to_use, $radius - $dist_from_diameter1, $xy);
    }
    else
    {
      display_planet_glyph($angle_to_use, $radius - ($dist_from_diameter2), $xy);
    }
    imagettftext($im, 16, 0, $xy[0] + $center_pt, $xy[1] + $center_pt, $planet_color, 'HamburgSymbols.ttf', chr($pl_glyph[$sort_pos[$i]]));
谢谢大家!!
ablase

剩下的就看你了。谢谢你,Marc B,我是个有点新手,但至少我很感激你给我指明了正确的方向。