Grafika\DrawingObject\QuadraticBezier::__construct PHP Method

__construct() public method

Creates a quadratic bezier. Quadratic bezier has 1 control point.
public __construct ( array $point1, array $control, array $point2, Color | string $color = '#000000' )
$point1 array Array of X and Y value for start point.
$control array Array of X and Y value for control point.
$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, $control, $point2, $color = '#000000')
    {
        if (is_string($color)) {
            $color = new Color($color);
        }
        $this->point1 = $point1;
        $this->control = $control;
        $this->point2 = $point2;
        $this->color = $color;
    }