The class call needs 5 arguments and accepts an optional 6th :
integer $width
Width of the image
integer $height
Height of the image
string $direction
The shape or direction of the gradient, which can be any of : vertical, horizontal, ellipse, ellipse2, circle, circle2, rectangle, diamond.
string $startcolor
Gradient start color, 3 or 6 digit hexadecimal ("#ff0″ or "#dd4578″)
string $endcolor
Gradient end color
Optional : $step
Breaks the gradient smooth blending