PHP Class Grafika\DrawingObject\Polygon

Datei anzeigen Open project: kosinix/grafika

Protected Properties

Property Type Description
$borderColor Grafika\Color
$borderSize integer
$fillColor Grafika\Color
$height integer Image height in pixels
$points array Array of all X and Y positions. Must have at least three positions (x,y).
$width integer Image width in pixels

Public Methods

Method Description
__construct ( array $points = [[0, 0], [0, 0], [0, 0]], integer $borderSize = 1, Color | string | boolean $borderColor = '#000000', Color | string | boolean $fillColor = '#FFFFFF' ) Creates a polygon.
getBorderColor ( ) : Color
getBorderSize ( ) : integer
getFillColor ( ) : Color
getHeight ( ) : integer
getPoints ( ) : array
getWidth ( ) : integer

Method Details

__construct() public method

Creates a polygon.
public __construct ( array $points = [[0, 0], [0, 0], [0, 0]], integer $borderSize = 1, Color | string | boolean $borderColor = '#000000', Color | string | boolean $fillColor = '#FFFFFF' )
$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 Grafika\Color | string | boolean Border color. Defaults to black. Set to null for no color.
$fillColor Grafika\Color | string | boolean Fill color. Defaults to white. Set to null for no color.

getBorderColor() public method

public getBorderColor ( ) : Color
return Grafika\Color

getBorderSize() public method

public getBorderSize ( ) : integer
return integer

getFillColor() public method

public getFillColor ( ) : Color
return Grafika\Color

getHeight() public method

public getHeight ( ) : integer
return integer

getPoints() public method

public getPoints ( ) : array
return array

getWidth() public method

public getWidth ( ) : integer
return integer

Property Details

$borderColor protected_oe property

protected Color,Grafika $borderColor
return Grafika\Color

$borderSize protected_oe property

protected int $borderSize
return integer

$fillColor protected_oe property

protected Color,Grafika $fillColor
return Grafika\Color

$height protected_oe property

Image height in pixels
protected int $height
return integer

$points protected_oe property

Array of all X and Y positions. Must have at least three positions (x,y).
protected array $points
return array

$width protected_oe property

Image width in pixels
protected int $width
return integer