> For the complete documentation index, see [llms.txt](https://imgo.gitbook.io/cn/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://imgo.gitbook.io/cn/api/canvas.md).

# Canvas

创建画布。

## 参数

<table><thead><tr><th width="198.4826833846656">参数名</th><th width="208.18338610093963">类型</th><th>说明</th></tr></thead><tbody><tr><td>width</td><td><code>int</code></td><td>画布宽度</td></tr><tr><td>height</td><td><code>int</code></td><td>画布高度</td></tr><tr><td>fillColor</td><td><code>color.Color</code></td><td>画布颜色。非必需参数，默认为透明。</td></tr></tbody></table>

## 返回值

`*imgo.Image` 类型的实例。

## 例子

```go
package main

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

func main() {
    imgo.Canvas(500, 500, color.White).
        Save("out.png")
}
```
