PHP Class Grafika\DrawingObject\Rectangle

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
$pos array X and Y position in an array.
$width integer Image width in pixels

Public Methods

Method Description
__construct ( integer $width, integer $height, array $pos = [0, 0], integer $borderSize = 1, Color | string | null $borderColor = '#000000', Color | string | null $fillColor = '#FFFFFF' ) Creates a rectangle.
getBorderColor ( ) : Color
getBorderSize ( ) : integer
getFillColor ( ) : Color
getHeight ( ) : integer
getPos ( ) : array
getWidth ( ) : integer

Method Details

__construct() public method

Creates a rectangle.
public __construct ( integer $width, integer $height, array $pos = [0, 0], integer $borderSize = 1, Color | string | null $borderColor = '#000000', Color | string | null $fillColor = '#FFFFFF' )
$width integer Width of rectangle in pixels.
$height integer Height in pixels.
$pos array Array of X and Y position. X is the distance in pixels from the left of the canvass to the left of the rectangle. Y is the distance from the top of the canvass to the top of the rectangle. Defaults to array(0,0).
$borderSize integer Size of the border in pixels. Defaults to 1 pixel. Set to 0 for no border.
$borderColor Grafika\Color | string | null Border color. Defaults to black. Set to null for no color.
$fillColor Grafika\Color | string | null 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

getPos() public method

public getPos ( ) : 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

$pos protected_oe property

X and Y position in an array.
protected array $pos
return array

$width protected_oe property

Image width in pixels
protected int $width
return integer