Polygon

Creates a polygon.

Parameters
points

Array of all X and Y positions. Must have at least three positions.

borderSize

Size of the border in pixels. Defaults to 1 pixel. Set to 0 for no border.

borderColor

Border color. Defaults to black. Set to null for no color.

fillColor

Fill color. Defaults to white. Set to null for no color.

Examples
//...

$editor->draw( $image, Grafika::createDrawingObject('Polygon', array(array(0,0), array(50,0), array(0,50)), 1));
$editor->draw( $image, Grafika::createDrawingObject('Polygon', array(array(200-1,0), array(150-1,0), array(200-1,50)), 1));
$editor->draw( $image, Grafika::createDrawingObject('Polygon', array(array(100,0), array(140,50), array(100,100), array(60,50)), 1, null, new Color('#FF0000')));

The result of the above code:

testPolygon