rectangle — draw a rectangle
Draw a colored rectangle on current image with top-left corner on x,y point 1 and bottom-right corner at x,y point 2. Define the overall appearance of the shape by passing a Closure callback as an optional parameter.
x-coordinate of the top-left point of the rectangle.
y-coordinate of the top-left point of the rectangle.
y-coordinate of the bottom-right point of the rectangle.
Define appearance of rectangle. See examples below. Use the following methods to pass details.
background
border
Define the border of the rectangle. Set width as pixels in the first and the border-color in one of the available color formats as second parameter.
Instance of Intervention\Image\Image