我的代码在用php绘制的星座轮上为每个行星放置字形。字形是用' chr'在imagettftext中,但我认为使用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