--- class.tslib_gifbuilder_old.php 2005-01-13 22:08:24.000000000 +0100 +++ class.tslib_gifbuilder.php 2005-01-13 21:50:47.000000000 +0100 @@ -242,6 +242,9 @@ $this->setup[$theKey.'.']['offset'] = $this->calcOffset($this->setup[$theKey.'.']['offset']); } break; +// modified begin + case 'LINE': +// modified end case 'BOX': if ($this->setup[$theKey.'.']['dimensions']) { $this->setup[$theKey.'.']['dimensions'] = $this->calcOffset($this->setup[$theKey.'.']['dimensions']); @@ -409,6 +412,11 @@ $this->workArea = $this->defaultWorkArea; // this sets the current to the default; } break; +// modified begin + case 'LINE': + $this->makeLine($this->im,$conf,$this->workArea); + break; +// modified end } } } @@ -440,6 +448,22 @@ +// modified begin + function makeLine(&$im,$conf,$workArea) { + $cords = t3lib_div::intExplode(',',$conf['dimensions'].',,,'); + $conf['offset']=$cords[0].','.$cords[1]; + $cords = $this->objPosition($conf,$workArea,Array($cords[2],$cords[3])); + $cols=$this->convertColor($conf['color']); + $this->reduceColors($im,256, 255); + $tmpColor = ImageColorAllocate($im, $cols[0],$cols[1],$cols[2]); + $thickness = t3lib_div::intInRange($conf['thickness'],1, 100); + if ($thickness && function_exists('imagesetthickness')) + imagesetthickness($im, $thickness); + imageline($im, $cords[0], $cords[1], $cords[2], $cords[3], $tmpColor); + if ($thickness && function_exists('imagesetthickness')) + imagesetthickness($im, 1); + } +// modified end