/** * generate image * @param $tags array tags of the signal */ public static function generateImage($height) { $speed = ""; if (isset($_GET["railway:signal:speed_limit:speed"])) { $speed = $_GET["railway:signal:speed_limit:speed"]; } $image = ' <g> <polygon fill="#000000" stroke="#999999" points="3,37 20,6 37,37" stroke-width="2"/>'; $path = Signal_path::getPath($speed); if (isset($path)) { $image .= ' <path d="' . $path . '" style="&white;" />'; } $image .= ' </g>'; $height = 40; return array($image, $height); }
/** * generate image * @param $tags array tags of the signal */ public static function generateImage($height) { $speed = ""; if (isset($_GET["railway:signal:speed_limit_distant:speed"])) { $speed = $_GET["railway:signal:speed_limit_distant:speed"]; } $image = ' <g transform="translate(0, ' . $height . ')"> <polygon style="&yellowzs3vbg;" points="3,1 20,32 37,1" stroke-width="2"/>'; $path = Signal_path::getPath($speed); if (isset($path)) { $image .= ' <path transform="translate(0, -13)" d="' . $path . '" style="&yellowzs3v;" />'; } $image .= ' </g>'; $height = 33; return array($image, $height); }