\Grafika\DrawingObjectRectangle

Base class

Summary

Methods
Properties
Constants
__construct()
getWidth()
getHeight()
getPos()
getBorderSize()
getFillColor()
getBorderColor()
No public properties found
No constants found
No protected methods found
$width
$height
$pos
$borderSize
$fillColor
$borderColor
N/A
No private methods found
No private properties found
N/A

Properties

$width

$width : integer

Image width in pixels

Type

integer

$height

$height : integer

Image height in pixels

Type

integer

$pos

$pos : array

X and Y position in an array.

Type

array

$borderSize

$borderSize : integer

Type

integer

Methods

__construct()

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

Creates a rectangle.

Parameters

integer $width

Width of rectangle in pixels.

integer $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).

integer $borderSize

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

\Grafika\Color|string|null $borderColor

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

\Grafika\Color|string|null $fillColor

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

getWidth()

getWidth() : integer

Returns

integer

getHeight()

getHeight() : integer

Returns

integer

getPos()

getPos() : array

Returns

array

getBorderSize()

getBorderSize() : integer

Returns

integer

getFillColor()

getFillColor() : \Grafika\Color

Returns

\Grafika\Color

getBorderColor()

getBorderColor() : \Grafika\Color

Returns

\Grafika\Color