# HG changeset patch # User Matti Hamalainen # Date 1394565779 -7200 # Node ID fa0a8bb7fcfd032bc74de8336b3ba7e58424358f # Parent c62f0cf2bf16aaf03f8bb8bc47cc2f64dc023f81 Removed. diff -r c62f0cf2bf16 -r fa0a8bb7fcfd overlay.php --- a/overlay.php Tue Mar 11 21:17:52 2014 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,129 +0,0 @@ - $xorig - $tilesize && $xoffs < $xorig + ($tilesize*2) && - $yoffs > $yorig - $tilesize && $yoffs < $yorig + ($tilesize*2); -} - - -$xorig = $xc * $tilesize; -$yorig = $yc * $tilesize; -$flag = FALSE; - -if ($zoom >= 4) -{ - -$file = fopen("overlay.txt", "r"); -while ($data = fgetcsv($file, 160, ",")) -{ - $xoffs = $data[0] * $zoom; - $yoffs = $data[1] * $zoom; - $char = $data[2]; - - if ($zoom >= 8 && chkcoords($xoffs, $yoffs)) - { - $px = $xoffs - $xorig; - $py = $yoffs - $yorig; - - imagefilledrectangle($im, $px, $py, $px+$zoom-1, $py+$zoom-1, $c_black); - imagettftext($im, $patchsize[$zoom], 0, - $px+$patchsize[$zoom]/4, - $py+$patchsize[$zoom], $c_white, $patchfont, $char); - - //imagechar($im,$patchsize[$zoom],$px,$py,$char,$c_white); - $flag = TRUE; - } -} -fclose($file); - - -$file = fopen("overlaylabels.txt", "r"); -while ($data = fgetcsv($file, 160, ",")) -{ - $xoffs = $data[0] * $zoom; - $yoffs = $data[1] * $zoom; - $text = $data[2]; - - if ($zoom >= 4 && chkcoords($xoffs, $yoffs)) - { - $px = $xoffs - $xorig; - $py = $yoffs - $yorig; - - $box = imagettfbbox($labelsize[$zoom], 0, $labelfont, $text); - imagefilledrectangle($im, - $px+$box[6]-2, - $py+$box[7]+2, - $px+$box[2]+2, - $py+$box[3]+6, - $c_alpha); - - imagettftext($im,$labelsize[$zoom],0,$px,$py+5, $c_white, $labelfont, $text); - $flag = TRUE; - } -} -fclose($file); - -} // zoom check - -// If tile block is dirty, store to a file -if ($flag) -{ - @imagepng($im, $cachefile); - @chmod($cachefile, 0644); -} - - -// Send out as PNG -header("Content-type: image/png"); -imagepng($im); -imagedestroy($im); -?>