Location: PHPKode > projects > PHP Cad and Drawing Program > phpcad/functions/hlines.inc
AAAAAAAAAAAAAAAAAAAAAAAAA
//
//  Draws up to 4 horizontal lines.
//
//
function hlines($image,$u,$v,$alc,$blc,$clc,$dlc,$scale,$x,$y) {
    $red  = hexdec(substr($alc,0,2));
    $grn  = hexdec(substr($alc,2,2));
    $blu  = hexdec(substr($alc,4,2));
    $a = ImageColorAllocate($image,$red,$grn,$blu);
    if ($blc != "") {
        $red  = hexdec(substr($blc,0,2));
        $grn  = hexdec(substr($blc,2,2));
        $blu  = hexdec(substr($blc,4,2));
        $b = ImageColorAllocate($image,$red,$grn,$blu);
    }
    if ($clc != "") {
         $red  = hexdec(substr($clc,0,2));
         $grn  = hexdec(substr($clc,2,2));
         $blu  = hexdec(substr($clc,4,2));
         $c = ImageColorAllocate($image,$red,$grn,$blu);
    }
    if ($dlc != "") {
         $red  = hexdec(substr($dlc,0,2));
         $grn  = hexdec(substr($dlc,2,2));
         $blu  = hexdec(substr($dlc,4,2));
         $d = ImageColorAllocate($image,$red,$grn,$blu);
    }
    $x=$x*$scale;
    $y=$y*$scale;
    $u=$u*$scale-1;
    $v=$v*$scale;
    $s=$scale/4;
  ImageFilledRectangle($image, $x, $y+0*$s, $u, $v+1*$s, $a);
  ImageFilledRectangle($image, $x, $y+1*$s, $u, $v+2*$s, $b);
  ImageFilledRectangle($image, $x, $y+2*$s, $u, $v+3*$s, $c);
  ImageFilledRectangle($image, $x, $y+3*$s, $u, $v+4*$s-1, $d);
}
BBBBBBBBBBBBBBBBBBBBBBBBBBBB
CCCCCCCCCCCCCCCCCCCCCCCC
function hlines($image,$u,$v,$alc,$blc,$clc,$dlc,$scale,$x,$y) {}
DDDDDDDDDDDDDDDDDDDDDDDD
$inthemenu = "no";
$dirlist= array("NA");
$lenlist= array("NA");
$txtitem="AAAAAA";
EEEEEEEEEEEEEEEEEEEEEEEEEEEEE
Return current item: PHP Cad and Drawing Program