Ejemplo n.º 1
0
     } else {
         if (strlen($_REQUEST['l']) > 1) {
             $linc++;
             if ($linc >= strlen($_REQUEST['l'])) {
                 $linc = 0;
             }
         }
         $l = substr($_REQUEST['l'], $linc, 1);
     }
     echo '<div class="';
     if (!$bw) {
         echo $lineColor;
     } else {
         echo 'x';
     }
     echo '" id="' . $inc . '" style="left:' . round(blend(($x1 - $offx) / $ratio - sin($bdir * pi() / 180) * $i + $sx, ($x2 - $offx) / $ratio - sin($bdir * pi() / 180) * $i + $sx, $i / $dotSpread)) . 'px;top:' . round(blend(($y1 - $offy) / $ratio - cos($bdir * pi() / 180) * $i + $sy, ($y2 - $offy) / $ratio - cos($bdir * pi() / 180) * $i + $sy, $i / $dotSpread)) . 'px;">' . $l . '</div>' . $nl;
     $inc++;
 }
 for ($i = 0; $i <= $thickness; $i += 0.5) {
     /////////////imageline($img, ($x1 - $offx) / $ratio - sin($bdir * pi() / 180)*$i, ($y1 - $offy) / $ratio - cos($bdir * pi() / 180)*$i, ($x2 - $offx) / $ratio - sin($bdir * pi() / 180)*$i, ($y2 - $offy) / $ratio - cos($bdir * pi() / 180)*$i, $lineColor);
     if ($setSize) {
         break;
     }
 }
 if (strpos($_REQUEST['arrows'], (string) $lt) !== false && $setSize == false) {
     //Speed arrows
     $asize = 6 / $ratio;
     $tx = ($x2 - $offx) / $ratio;
     $ty = ($y2 - $offy) / $ratio;
     $ax = $tx + cos($bdir * pi() / 180) * $asize;
     $ay = $ty - sin($bdir * pi() / 180) * $asize;
Ejemplo n.º 2
0
if ($id == "bl" || $id == "br") {
    $img = imagecreate(80, $bh);
}
for ($i = 0; $i < $th; $i++) {
    $j = $i / $th;
    $grad1[$i] = imagecolorallocate($img, blend($col3[0], $col4[0], $j), blend($col3[1], $col4[1], $j), blend($col3[2], $col4[2], $j));
}
for ($i = 0; $i < $bub; $i++) {
    $j = $i / $bub;
    $grad2[$i] = imagecolorallocate($img, blend($col1[0], $col2[0], $j), blend($col1[1], $col2[1], $j), blend($col1[2], $col2[2], $j));
}
for ($i = 0; $i < $edge; $i++) {
    $j = $i / $edge;
    $ta = blend($colbo[0], $colbg[0], $j) + 80;
    $tb = blend($colbo[1], $colbg[1], $j) + 80;
    $tc = blend($colbo[2], $colbg[2], $j) + 80;
    if ($ta > 255) {
        $ta = 255;
    }
    if ($tb > 255) {
        $tb = 255;
    }
    if ($tc > 255) {
        $tc = 255;
    }
    $grad3[$i] = imagecolorallocate($img, $ta, $tb, $tc);
}
$grad3[0] = imagecolorallocate($img, $colbo[0], $colbo[1], $colbo[2]);
if ($id == "tm" || $id == "tl" || $id == "tr") {
    $tmpw = 4;
    if ($id != "tm") {
Ejemplo n.º 3
0
$colorAccel = imagecolorallocate($img, blend(255, $bgcolor[0], $fade), blend(0, $bgcolor[1], $fade), blend(0, $bgcolor[2], $fade));
$colorBack = imagecolorallocate($img, blend(0, $bgcolor[0], $fade), blend(255, $bgcolor[1], $fade), blend(0, $bgcolor[2], $fade));
$colorBackground = imagecolorallocate($img, $bgcolor[0], $bgcolor[1], $bgcolor[2]);
if (empty($grad)) {
    imagefilledrectangle($img, 0, 0, $width, $height, $colorBackground);
} else {
    if ($hgrad) {
        $in = $width / 255;
    } else {
        $in = $height / 255;
    }
    for ($i = 0; $i < 255; $i++) {
        if ($hgrad) {
            imagefilledrectangle($img, $i * $in, 0, ($i + 1) * $in, $height, imagecolorallocate($img, blend($bgcolor[0], $gradcolor[0], $i / 255), blend($bgcolor[1], $gradcolor[1], $i / 255), blend($bgcolor[2], $gradcolor[2], $i / 255)));
        } else {
            imagefilledrectangle($img, 0, $i * $in, $width, ($i + 1) * $in, imagecolorallocate($img, blend($bgcolor[0], $gradcolor[0], $i / 255), blend($bgcolor[1], $gradcolor[1], $i / 255), blend($bgcolor[2], $gradcolor[2], $i / 255)));
        }
    }
}
imageantialias($img, true);
fseek($file, 0);
$startLine = false;
if (!isset($_REQUEST['arrows'])) {
    $_REQUEST['arrows'] = "1";
}
// String that tells which lines to use arrows on eg. 1, 12, 2, 012
while (feof($file) == false) {
    $skip = false;
    if (ftell($file) == filesize("tracks/" . $_REQUEST['id'] . ".track")) {
        break;
    }