pdf_closepath($pdf);
    pdf_fill($pdf);
    // outline ribbon 2
    pdf_moveto($pdf, 660, 150);
    pdf_lineto($pdf, 680, 49);
    pdf_lineto($pdf, 695, 69);
    pdf_lineto($pdf, 716, 55);
    pdf_lineto($pdf, 696, 150);
    pdf_closepath($pdf);
    pdf_stroke($pdf);
    pdf_setcolor($pdf, 'fill', 'rgb', 1, 0, 0, 0);
    // red
    //draw rosette
    draw_star(665, 175, 32, 57, 10, $pdf, true);
    //outline rosette
    draw_star(665, 175, 32, 57, 10, $pdf, false);
    // finish up the page and prepare to output
    pdf_end_page($pdf);
    pdf_close($pdf);
    $data = pdf_get_buffer($pdf);
    // generate the headers to help a browser choose the correct application
    header('Content-type: application/pdf');
    header('Content-disposition: inline; filename=test.pdf');
    header('Content-length: ' . strlen($data));
    // output PDF
    echo $data;
}
function draw_star($centerx, $centery, $points, $radius, $point_size, $pdf, $filled)
{
    $inner_radius = $radius - $point_size;
    for ($i = 0; $i <= $points * 2; $i++) {
/**
* holt alle sterne zu gegebenen constellationen
*
* @param $cids
* @return
*/
function get_svg_stars_of_cids($cids, &$fleet_symbols, &$fleet_routes, &$scans, &$systems)
{
    global $uid;
    global $map_info;
    $closest_stars = get_stars($cids);
    $system_user_type_defs = "<defs>";
    $system_user_type = "<g pointer-events=\"none\">";
    if (is_array($closest_stars)) {
        $scans = "<g pointer-events=\"none\" id=\"scanradien\">";
        $system_names = "<g style=\"font-size:7pt;fill:#A5D9FF;stroke:none;font-family:verdana,arial;letter-spacing:1pt;\" pointer-events=\"none\">";
        $systems = "<g onclick=\"clickOnStar(evt);\" onmouseover=\"mouseoverStar(evt);\" onmouseout=\"mouseoutStar(evt);\">";
        foreach ($closest_stars as $sid => $its_star) {
            if ($its_star["userstypes"]) {
                $system_user_type_defs .= $its_star["userstypes"];
                $system_user_type .= "<use xlink:href=\"#user_in_system_" . $sid . "\" x=\"" . $its_star[x] . "\" y=\"" . ($its_star[y] + 25) . "\"/>";
                // scanradien, wenn ein system ein system_user_type hat, ist jemand in dem system, können also scanradien vorhanden sein
                if ($map_info->is_own_star($sid)) {
                    $scanrange = $map_info->get_systemscanradius($sid);
                    $scans .= draw_scancircles($its_star[x], $its_star[y], $scanrange);
                }
            }
            $systems .= draw_star($its_star["x"], $its_star["y"], $sid, $its_star["scan"]);
            $system_names .= draw_system_name($sid, $its_star["scan"], $its_star["name"], $its_star["x"], $its_star["y"]);
            //___________________________ System Flotten
            if ($its_star["scan"] == SYSTEM_VISIBLE) {
                $system_fleets = $map_info->get_fids_by_sid($sid);
                if (is_array($system_fleets)) {
                    $fleet_symbols .= draw_fleets($its_star[x], $its_star[y], $system_fleets, $sid);
                    $fleet_routes .= get_fleet_routes($system_fleets);
                }
                $fleet_scans .= draw_fleet_scancircles($its_star[x], $its_star[y], $sid);
            }
            //___________________________ Spezial Symbole
            $special_symbols = $map_info->get_special_buildings_by_sid($sid, 1);
            if (is_array($special_symbols)) {
                $specials .= "<g id=\"specialSymbols_" . $sid . "\" pointer-events=\"none\">";
                $specials .= draw_special_symbols($its_star[x], $its_star[y], $special_symbols, $sid);
                $specials .= "<set attributeType=\"XML\" attributeName=\"display\" to=\"none\" begin=\"s" . $sid . ".mouseover\"/>";
                $specials .= "<set attributeType=\"XML\" attributeName=\"display\" to=\"inherit\" begin=\"s" . $sid . ".mouseout\"/>";
                $specials .= "</g>";
            }
        }
    }
    $system_user_type_defs .= "</defs>";
    $system_user_type .= "</g>";
    $system_names .= "</g>";
    $systems .= "</g>";
    $scans .= $fleet_scans;
    $scans .= "</g>";
    $systems = $system_user_type_defs . $system_user_type . $systems . $system_names . $specials;
}