\Grafika\Gd\DrawingObjectQuadraticBezier

Class QuadraticBezier

Summary

Methods
Properties
Constants
__construct()
getPoint1()
getControl()
getPoint2()
getColor()
draw()
No public properties found
No constants found
plot()
plotSegment()
plotLine()
setPixel()
$point1
$control
$point2
$color
N/A
No private methods found
No private properties found
N/A

Properties

$point1

$point1 : array

Starting point.

Type

array

$control

$control : array

Control point.

Type

array

$point2

$point2 : array

End point.

Type

array

Methods

__construct()

__construct(array  $point1, array  $control, array  $point2, \Grafika\Color|string  $color = '#000000') 

Creates a quadratic bezier. Quadratic bezier has 1 control point.

Parameters

array $point1

Array of X and Y value for start point.

array $control

Array of X and Y value for control point.

array $point2

Array of X and Y value for end point.

\Grafika\Color|string $color

Color of the curve. Accepts hex string or a Color object. Defaults to black.

getPoint1()

getPoint1() : array

Returns

array

getControl()

getControl() : array

Returns

array

getPoint2()

getPoint2() : array

Returns

array

plot()

plot(  $gd,   $x0,   $y0,   $x1,   $y1,   $x2,   $y2) 

Parameters

$gd
$x0
$y0
$x1
$y1
$x2
$y2

plotSegment()

plotSegment(  $gd,   $x0,   $y0,   $x1,   $y1,   $x2,   $y2) 

Draw an limited anti-aliased quadratic Bezier segment.

Parameters

$gd
$x0
$y0
$x1
$y1
$x2
$y2

plotLine()

plotLine(  $gd,   $x0,   $y0,   $x1,   $y1) 

Parameters

$gd
$x0
$y0
$x1
$y1

setPixel()

setPixel(resource  $gd, integer  $x, integer  $y, float  $ar) 

Parameters

resource $gd
integer $x
integer $y
float $ar

Alpha ratio