Location: PHPKode > projects > PHP Cad and Drawing Program > functions/line.inc
AAAAAAAAAAAAAAAAAAAAAAAAA
//
//  Draws a line from x,y to u,v.  Function should be changed
//  with a rectangle instead of line to allow proper scaling
//  on line thickness.
//
function line($image, $u, $v, $scale, $x, $y)
{
    $edge=ImageColorAllocate($image,160,160,150);
    $x=$x*$scale;
    $u=$u*$scale;
    $y=$y*$scale;
    $v=$v*$scale;
    Imageline($image,$x,$y,$u,$v,$edge);
    Imageline($image,$x+1,$y,$u+1,$v,$edge);
    Imageline($image,$x,$y+1,$u,$v+1,$edge);
}
BBBBBBBBBBBBBBBBBBBBBBBBBBBB
if ($PObj == "line") {
    if ($xx !="" and $yy !="" and $u !="" and $v !="") {
        $a=fopen("./files/$pfilez", "a");
        $xp = "<?php " . $PObj . "($" . "image,";
        $xp .= $u . "," . $v . ",";
        $xp .= "$" . "scale," . $xx . "," . $yy . "); ?>\n";
        fwrite($a, $xp );
        fclose($a);
    }
}
CCCCCCCCCCCCCCCCCCCCCCCC
function line($image,$bx,$by,$scale,$ax,$ay){}
DDDDDDDDDDDDDDDDDDDDDDDD
$inthemenu = "yes";
$dirlist= array("NA");
$lenlist= array("NA");
$txtitem="";
EEEEEEEEEEEEEEEEEEEEEEEEEEEEE
Return current item: PHP Cad and Drawing Program