class Rectangle

Base class

Methods

__construct(int $width, int $height, array $pos = array(0, 0), int $borderSize = 1, Color|string|null $borderColor = '#000000', Color|string|null $fillColor = '#FFFFFF')

Creates a rectangle.

int
getWidth()

No description

int
getHeight()

No description

array
getPos()

No description

int
getBorderSize()

No description

getFillColor()

No description

getBorderColor()

No description

Details

at line line 55
__construct(int $width, int $height, array $pos = array(0, 0), int $borderSize = 1, Color|string|null $borderColor = '#000000', Color|string|null $fillColor = '#FFFFFF')

Creates a rectangle.

Parameters

int $width Width of rectangle in pixels.
int $height Height in pixels.
array $pos 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).
int $borderSize Size of the border in pixels. Defaults to 1 pixel. Set to 0 for no border.
Color|string|null $borderColor Border color. Defaults to black. Set to null for no color.
Color|string|null $fillColor Fill color. Defaults to white. Set to null for no color.

at line line 80
int getWidth()

Return Value

int

at line line 88
int getHeight()

Return Value

int

at line line 96
array getPos()

Return Value

array

at line line 104
int getBorderSize()

Return Value

int

at line line 112
Color getFillColor()

Return Value

Color

at line line 120
Color getBorderColor()

Return Value

Color