Location: PHPKode > scripts > Graidle > graidle/graidle_line.ext.php
<?php
class Line extends Graidle
{
	function drawLine()
	{
		imageantialias($this->im,TRUE);

		for($t=0;$t<count($this->value);$t++)
		{
			if($this->type[$t]=='l')
			{
				$cc=$this->color[$t];
				list($name,$red,$green,$blue)=explode(',',$cc);
				$cc=imagecolorallocate($this->im,$red,$green,$blue);

				
				for($x=0,$i=0,$i1=1;$i1<count($this->value[$t]);$i++,$i1++)
				{
					if(!$x)	
					{
						if($this->mnvs<=0)
						{
							if($this->value[$t][$i]>=0)	imageline($this->im, $x+=$this->s+(($this->larg+$this->disbar)/2) , $y1=($this->h-$this->b)-($this->value[$t][$i]*$this->mul)-(abs($this->mn+$this->scarmin)*$this->mul) , $x+=$this->disbar+$this->larg , $y2=$this->h-$this->b-(($this->value[$t][$i1])*$this->mul)-(abs($this->mn+$this->scarmin)*$this->mul) , $cc);
							else						imageline($this->im, $x+=$this->s+(($this->larg+$this->disbar)/2) , $y1=($this->h-$this->b)-($this->value[$t][$i]*$this->mul)-(abs($this->mn+$this->scarmin)*$this->mul) , $x+=$this->disbar+$this->larg , $y2=$this->h-$this->b-(($this->value[$t][$i1])*$this->mul)-(abs($this->mn+$this->scarmin)*$this->mul) , $cc);
							
							imagefilledellipse($this->im,$x-$this->larg-$this->disbar,$y1,4,4,$cc);
							imagefilledellipse($this->im,$x,$y2,4,4,$cc);	
						}
						else
						{
							if($this->value[$t][$i]>=0)	imageline($this->im, $x+=$this->s+(($this->larg+$this->disbar)/2) , $y1=($this->h-$this->b)-(($this->value[$t][$i]-$this->mnvs)*$this->mul),  $x+=$this->disbar+$this->larg ,$y2=$this->h-$this->b+($this->mnvs*$this->mul)-(($this->value[$t][$i1])*$this->mul),$cc);
							else						$x+=$this->s+(($this->larg+$this->disbar)/2);
							imagefilledellipse($this->im,$x-$this->larg-$this->disbar,$y1,4,4,$cc);
							imagefilledellipse($this->im,$x,$y2,4,4,$cc);
						}
					}
					else
					{
						if($this->mnvs<=0)
						{
							if($this->value[$t][$i]>=0)	imageline($this->im, $x , ($this->h-$this->b)-($this->value[$t][$i]*$this->mul)-(abs($this->mn+$this->scarmin)*$this->mul) , $x+=$this->larg+$this->disbar , $y1=$this->h-$this->b-($this->value[$t][$i1]*$this->mul)-(abs($this->mn+$this->scarmin)*$this->mul) , $cc);
							else						imageline($this->im, $x , ($this->h-$this->b)-($this->value[$t][$i]*$this->mul)-(abs($this->mn+$this->scarmin)*$this->mul) , $x+=$this->larg+$this->disbar , $y1=$this->h-$this->b-($this->value[$t][$i1]*$this->mul)-(abs($this->mn+$this->scarmin)*$this->mul) , $cc);
							imagefilledellipse($this->im,$x,$y1,4,4,$cc);	
						}
						else
						{
							if($this->value[$t][$i]>=0)	imageline($this->im , $x , $y1=($this->h-$this->b)-(($this->value[$t][$i]-$this->mnvs)*$this->mul),  $x+=$this->disbar+$this->larg , $y2=$this->h-$this->b-(($this->value[$t][$i1]-$this->mnvs)*$this->mul),$cc);
							else	$x+=$this->s+(($this->larg+$this->disbar)/2);
							imagefilledellipse($this->im, $x-$this->disbar-$this->larg ,$y1,4,4,$cc);	
						}	
					}
				}
			}
		}
	imageantialias($this->im,FALSE);
	}
}
?>
Return current item: Graidle