示例#1
0
文件: render.php 项目: shish/travmap
function draw_entity_label($image, $entity, $colour)
{
    global $server, $white, $imagettftext;
    aimacustom($image, "<a xlink:href='http://{$server}/" . $entity['link'] . "'>");
    # yes, we want this to only apply to aima, not gd
    aimafilledrectangle($image, $entity['x'] + 7, $entity['y'] - 7, $entity['x'] + 90, $entity['y'] + 7, $white);
    dot($image, $entity['dx'], $entity['dy'], $colour);
    $entity_name = $entity["name"];
    $count = $entity['count'];
    $title = $count ? "{$entity_name} (" . ($count + 1) . ")" : $entity_name;
    $imagettftext($image, 10, 0, $entity['x'], $entity['y'] + 5, $colour, "arialuni", $title);
    aimacustom($image, "</a>");
}
示例#2
0
文件: libaima.php 项目: shish/travmap
function aimafill($im, $x, $y, $colid)
{
    global $svgSizes;
    aimafilledrectangle($im, $x, $y, $svgSizes[$im][0], $svgSizes[$im][1], $colid);
}