# Rectangle

Draw a rectangle in the image.

## Parameters

<table><thead><tr><th>Parameter</th><th width="208.18338610093963">Type</th><th>Description</th></tr></thead><tbody><tr><td>x</td><td><code>int</code></td><td>X-Coordinate of the top-left corner of the rectangle.</td></tr><tr><td>y</td><td><code>int</code></td><td>Y-Coordinate of the top-left corner of the rectangle.</td></tr><tr><td>width</td><td><code>int</code></td><td>Width of the rectangle.</td></tr><tr><td>height</td><td><code>int</code></td><td>Height of the rectangle.</td></tr><tr><td>c</td><td><code>color.Color</code></td><td>Color of the rectangle.</td></tr></tbody></table>

## Return Values

The instance of `*imgo.Image` .

## Examples

```go
package main

import (
    "github.com/fishtailstudio/imgo"
    "image/color"
)

func main() {
    imgo.Canvas(300, 300, color.White).
        Rectangle(100, 100, 100, 150, color.Black).
        Save("out.png")
}
```
