public __construct ( array $points = [[0, 0], [0, 0], [0, 0]], integer $borderSize = 1, |
||
$points | array | Array of all X and Y positions. Must have at least three positions. |
$borderSize | integer | 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. |
public function __construct($points = array(array(0, 0), array(0, 0), array(0, 0)), $borderSize = 1, $borderColor = '#000000', $fillColor = '#FFFFFF')
{
if (is_string($borderColor)) {
$borderColor = new Color($borderColor);
}
if (is_string($fillColor)) {
$fillColor = new Color($fillColor);
}
$this->points = $points;
$this->borderSize = $borderSize;
$this->borderColor = $borderColor;
$this->fillColor = $fillColor;
}