public function render(Badge $badge)
    {
        $subjectWidth = $this->stringWidth($badge->getSubject());
        $statusWidth = $this->stringWidth($badge->getStatus());

        $params = [
            'vendorWidth'         => $subjectWidth,
            'valueWidth'          => $statusWidth,
            'totalWidth'          => ($subjectWidth + $statusWidth) + 7,
            'vendorColor'         => $this->color,
            'valueColor'          => $badge->getHexColor(),
            'vendor'              => $badge->getSubject(),
            'value'               => $badge->getStatus(),
            'vendorStartPosition' => round($subjectWidth / 2, 1) + 1,
            'valueStartPosition'  => $subjectWidth + $statusWidth / 2 + 6,
            'arrowStartPosition'  => $subjectWidth + 6,
            'arrowPathPosition'   => $subjectWidth + 6.5,
        ];

        return $this->renderSvg($params, $badge->getFormat());
    }
public function render(Badge $badge)
    {
        $subjectWidth = $this->stringWidth($badge->getSubject());
        $statusWidth = $this->stringWidth($badge->getStatus());

        $params = [
            'vendorWidth'         => $subjectWidth,
            'valueWidth'          => $statusWidth,
            'totalWidth'          => ($subjectWidth + $statusWidth) + 7,
            'vendorColor'         => $this->color,
            'valueColor'          => $badge->getHexColor(),
            'vendor'              => $badge->getSubject(),
            'value'               => $badge->getStatus(),
            'vendorStartPosition' => round($subjectWidth / 2, 1) + 1,
            'valueStartPosition'  => $subjectWidth + $statusWidth / 2 + 6,
            'arrowStartPosition'  => $subjectWidth + 6,
            'arrowPathPosition'   => $subjectWidth + 6.5,
        ];

        return $this->renderSvg($params, $badge->getFormat());
    }
public function render ( Badge $ badge ) { $ subjectWidth = $ this -> stringWidth ( $ badge -> getSubject ( ) ) ; $ statusWidth = $ this -> stringWidth ( $ badge -> getStatus ( ) ) ; $ params = [ 'vendorWidth' => $ subjectWidth , 'valueWidth' => $ statusWidth , 'totalWidth' => ( $ subjectWidth + $ statusWidth ) + 7 , 'vendorColor' => $ this -> color , 'valueColor' => $ badge -> getHexColor ( ) , 'vendor' => $ badge -> getSubject ( ) , 'value' => $ badge -> getStatus ( ) , 'vendorStartPosition' => round ( $ subjectWidth / 2 , 1 ) + 1 , 'valueStartPosition' => $ subjectWidth + $ statusWidth / 2 + 6 , 'arrowStartPosition' => $ subjectWidth + 6 , 'arrowPathPosition' => $ subjectWidth + 6.5 , ] ; return $ this -> renderSvg ( $ params , $ badge -> getFormat ( ) ) ; }
Render a badge.

@param \AltThree\Badger\Badge $badge

@return \AltThree\Badger\BadgeImage
Render a badge .