Grafika\DrawingObject\CubicBezier::__construct PHP Method

__construct() public method

Creates a cubic bezier. Cubic bezier has 2 control points.
public __construct ( array $point1, array $control1, array $control2, array $point2, Color | string $color = '#000000' )
$point1 array Array of X and Y value for start point.
$control1 array Array of X and Y value for control point 1.
$control2 array Array of X and Y value for control point 2.
$point2 array Array of X and Y value for end point.
$color Grafika\Color | string Color of the curve. Accepts hex string or a Color object. Defaults to black.
    public function __construct($point1, $control1, $control2, $point2, $color = '#000000')
    {
        if (is_string($color)) {
            $color = new Color($color);
        }
        $this->point1 = $point1;
        $this->control1 = $control1;
        $this->control2 = $control2;
        $this->point2 = $point2;
        $this->color = $color;
    }