Begins a new shape. The shape should be ended with a call to endShape.

@param \Jdenticon\Color $color The color of the shape.
359088
public function beginShape(\Jdenticon\Color $color)
    {
        $colorString = $color->toHexString(6);
        
        if (isset($this->pathsByColor[$colorString])) {
            $this->path = $this->pathsByColor[$colorString];
        } else {
            $this->path = new SvgPath();
            $this->pathsByColor[$colorString] = $this->path;
        }
    }
763463
protected function background($color = null)
    {
        if (!is_null($color)) {
            $this->resource->setImageBackgroundColor(sprintf('#%s', $color));
        }
        return $this;
    }
830800
protected function background($color = null)
    {
        if (is_string($color)) {
            $this->commands['-background "#%s"'] = [trim($color, '#')];
        }
        return $this;
    }
172525
public void setColor(final Color COLOR) {
        if (null == color) {
            _color = COLOR;
        } else {
            color.set(COLOR);
        }
    }
1315177
public void setCustomPointerColor(final Color COLOR) {
        getModel().setCustomPointerColorObject(new CustomColorDef(COLOR));
        init(getInnerBounds().width, getInnerBounds().height);
        repaint(getInnerBounds());
    }
69289
public static function color($text, $color)
    {
        if (isset(ShellTool::$colors[$color])) {
            return ShellTool::$colors[$color]['start'] . $text . ShellTool::$colors[$color]['close'];
        } else {
            return $text;
        }
    }
1148731
public function bg($color)
    {
        Assert::nullOrOneOf($color, self::$colors, 'The color must be null or one of the Style::* color constants. Got: "%s"');

        $this->bgColor = $color;

        return $this;
    }
84264
public function color($color)
    {
        if ($color !== null) {
            Checkers::checkColor($color, null);
        }
        $this->color = $color;
        return $this;
    }
1202856
public function setIconColor($color = null)
    {
        $color === null || Checkers::checkColor($color, null);
        $this->iconColor = $color;
        return $this;
    }
532457
public static function begin($string = '', $color = null, $bold = false)
    {
        return new Line($string, $color, $bold);
    }
1163454
function setBgColor($color)
    {
        $value = $this->_getColor($color);
        $this->_bg_color = $value;
        if ($this->_pattern == 0) { // force color to be seen
            $this->_pattern = 1;
        }
    }
1217679
function clear( $color = false )
    {
        if ( $color === false )
        {
            if ( count( $this->PaletteIndex ) > 0)
                $color = $this->PaletteIndex[0];
            else
                $color = 'bgcol';
        }
        if ( is_string( $color ) )
            $color = $this->color( $color );
        ImageFilledRectangle( $this->ImageObject, 0, 0, $this->Width, $this->Height, $color );
    }
1350686
public function setBackground($color = null)
    {
        if (null === $color) {
            $this->background = null;
            return;
        }
        if (!isset(static::$availableBackgroundColors[$color])) {
            throw new \InvalidArgumentException(sprintf(
                'Invalid background color specified: "%s". Expected one of (%s)',
                $color,
                implode(', ', array_keys(static::$availableBackgroundColors))
            ));
        }
        $this->background = static::$availableBackgroundColors[$color];
    }
942388
protected function _set_fill_colour($colour) {
    $colour[0] = round(255 * $colour[0]);
    $colour[1] = round(255 * $colour[1]);
    $colour[2] = round(255 * $colour[2]);

    if ( is_null($this->_last_fill_color) || $color != $this->_last_fill_color ) {
      $this->_pdf->SetDrawColor($color[0],$color[1],$color[2]);
      $this->_last_fill_color = $color;
    }

  }
649517
public function setBackgroundColor($color)
    {
        $this->_backgroundColor = $color;
        $this->_rtf->getColorTable()->add($color);
    }
500617
private function createRectangle($color)
    {
        imagefilledrectangle(
            $this->resource,
            0,
            0,
            $this->width,
            $this->height,
            $color
        );
    }
459125
public void setEndCornerColor(Color color) {
        if (endColor == null) {
            endColor = new RGBColor(0.0, 0.0, 0.0);
        }
        setGradation(true);
        this.endColor = color;
    }