mirror of
https://github.com/fishtailstudio/imgo
synced 2025-09-27 04:46:11 +08:00
18 lines
405 B
Go
18 lines
405 B
Go
package main
|
|
|
|
import (
|
|
"github.com/fishtailstudio/imgo"
|
|
"golang.org/x/image/colornames"
|
|
"image/color"
|
|
)
|
|
|
|
func main() {
|
|
imgo.Canvas(500, 500, color.Black).
|
|
Pixel(10, 10, colornames.Blueviolet).
|
|
Line(20, 10, 50, 450, colornames.Gold).
|
|
Circle(200, 100, 50, colornames.Aqua).
|
|
Rectangle(150, 200, 100, 150, colornames.Darkblue).
|
|
Ellipse(400, 200, 150, 50, colornames.Tomato).
|
|
Save("out.png")
|
|
}
|