$width
$width : integer
Image width in pixels
Class Rectangle
$fillColor : \Grafika\Color
$borderColor : \Grafika\Color
__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.
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. |
getFillColor() : \Grafika\Color
getBorderColor() : \Grafika\Color
draw(\Grafika\ImageInterface $image) : \Grafika\ImageInterface
\Grafika\ImageInterface | $image |