protected function drawRing($image, $arcwidth)
    {
        $color = $this->randomColor($image);
        $transparency = $this->transparentColor($image);

        $start = $this->rand(20, 360);
        $stop = $this->rand(20, 360);
        if($stop < $start) list($start, $stop) = array($stop, $start);

        imagefilledarc($image, $this->center, $this->center, $arcwidth, $arcwidth, $stop, $start, $color, IMG_ARC_PIE);
        imagefilledellipse($image, $this->center, $this->center, $arcwidth - $this->ringwidth,
            $arcwidth - $this->ringwidth, $transparency);

        imagecolordeallocate($image, $color);
        imagecolordeallocate($image, $transparency);
    }
protected function drawRing($image, $arcwidth)
    {
        $color = $this->randomColor($image);
        $transparency = $this->transparentColor($image);

        $start = $this->rand(20, 360);
        $stop = $this->rand(20, 360);
        if($stop < $start) list($start, $stop) = array($stop, $start);

        imagefilledarc($image, $this->center, $this->center, $arcwidth, $arcwidth, $stop, $start, $color, IMG_ARC_PIE);
        imagefilledellipse($image, $this->center, $this->center, $arcwidth - $this->ringwidth,
            $arcwidth - $this->ringwidth, $transparency);

        imagecolordeallocate($image, $color);
        imagecolordeallocate($image, $transparency);
    }
protected function drawRing ( $ image , $ arcwidth ) { $ color = $ this -> randomColor ( $ image ) ; $ transparency = $ this -> transparentColor ( $ image ) ; $ start = $ this -> rand ( 20 , 360 ) ; $ stop = $ this -> rand ( 20 , 360 ) ; if ( $ stop < $ start ) list ( $ start , $ stop ) = array ( $ stop , $ start ) ; imagefilledarc ( $ image , $ this -> center , $ this -> center , $ arcwidth , $ arcwidth , $ stop , $ start , $ color , IMG_ARC_PIE ) ; imagefilledellipse ( $ image , $ this -> center , $ this -> center , $ arcwidth - $ this -> ringwidth , $ arcwidth - $ this -> ringwidth , $ transparency ) ; imagecolordeallocate ( $ image , $ color ) ; imagecolordeallocate ( $ image , $ transparency ) ; }
Drawas a single ring

@param resource $image
@param int $arcwidth outer width of the ring
Drawas a single ring