|
|
|
This request has been opened by : unknown |
|
Feature description |
|
Importance |
: |
|
Low |
|
Status |
: |
Not started |
Key Feature |
: |
|
No |
|
|
|
Message from mice32alpha on 02/12/2010 |
Fixed version of drawLine function:
/* Draw a line between two points */
function drawLine($X1,$Y1,$X2,$Y2,$Format="")
{
$R = isset($Format["R"]) ? $Format["R"] : 0;
$G = isset($Format["G"]) ? $Format["G"] : 0;
$B = isset($Format["B"]) ? $Format["B"] : 0;
$Alpha = isset($Format["Alpha"]) ? $Format["Alpha"] : 100;
$Ticks = isset($Format["Ticks"]) ? $Format["Ticks"] : NULL;
$Cpt = isset($Format["Cpt"]) ? $Format["Cpt"] : 1;
$Mode = isset($Format["Mode"]) ? $Format["Mode"] : 1;
if (!$this->Antialias && $Ticks == NULL)
{
$Color = $this->allocateColor($this->Picture,$R,$G,$B,$Alpha);
imageline($this->Picture,$X1,$Y1,$X2,$Y2,$Color);
return(0);
}
$Distance = sqrt(($X2-$X1)*($X2-$X1)+($Y2-$Y1)*($Y2-$Y1));
if ( $Distance == 0 ) { return(-1); }
$XStep = ($X2-$X1) / $Distance;
$YStep = ($Y2-$Y1) / $Distance;
if(!$this->Antialias)
$Color = $this->allocateColor($this->Picture, $R, $G, $B, $Alpha);
for($i=0;$i<=$Distance;$i++)
{
$X = $i * $XStep + $X1;
$Y = $i * $YStep + $Y1;
if ( $Ticks != NULL )
{
if ( $Cpt % $Ticks == 0 )
{ $Cpt = 0; if ( $Mode == 1 ) { $Mode = 0; } else { $Mode = 1; } }
if ( $Mode == 1 )
{
if(!$this->Antialias)
imageSetPixel($this->Picture, $X, $Y, $Color);
else
$this->drawAntialiasPixel($X,$Y,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha));
}
$Cpt++;
}
else
$this->drawAntialiasPixel($X,$Y,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha));
}
return(array($Cpt,$Mode));
}
|
Message from Jean-Damien on 03/12/2010 |
Thanks for this fix, indeed I've forgotten to test the lib in "low-res" mod.. this is something I've written more than one year ago ;o)
I'm astonished by the rendering speeding while turning of the antialias engine.
forgotten to say : this fix is implemented in the next sub release.
| |
To post wishes add comments or vote, you must be logged. To create an account use the Register link on top of this page.
| |