PHP Class Grafika\DrawingObject\CubicBezier

Datei anzeigen Open project: kosinix/grafika

Protected Properties

Property Type Description
$color Grafika\Color Color of curve.
$control1 array Control point 1. Array of X Y values.
$control2 array Control point 2. Array of X Y values.
$point1 array Starting point. Array of X Y values.
$point2 array End point. Array of X Y values.

Public Methods

Method Description
__construct ( array $point1, array $control1, array $control2, array $point2, Color | string $color = '#000000' ) Creates a cubic bezier. Cubic bezier has 2 control points.
getColor ( ) : Color
getControl1 ( ) : array
getControl2 ( ) : array
getPoint1 ( ) : array
getPoint2 ( ) : array

Method Details

__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.

getColor() public method

public getColor ( ) : Color
return Grafika\Color

getControl1() public method

public getControl1 ( ) : array
return array

getControl2() public method

public getControl2 ( ) : array
return array

getPoint1() public method

public getPoint1 ( ) : array
return array

getPoint2() public method

public getPoint2 ( ) : array
return array

Property Details

$color protected_oe property

Color of curve.
protected Color,Grafika $color
return Grafika\Color

$control1 protected_oe property

Control point 1. Array of X Y values.
protected array $control1
return array

$control2 protected_oe property

Control point 2. Array of X Y values.
protected array $control2
return array

$point1 protected_oe property

Starting point. Array of X Y values.
protected array $point1
return array

$point2 protected_oe property

End point. Array of X Y values.
protected array $point2
return array