Closed setanarut closed 2 years ago
Drawing arguments are not coherent with the standard image library. for example I think it should be like this. Not (x, y , v , v);
package main import ( "image" "image/color" "github.com/fogleman/gg" ) func main() { size := image.Point{256, 128} circlePoint := image.Point{100, 100} myColor := color.RGBA{43, 128, 3, 1} dc := gg.NewContext(size) dc.DrawCircle(circlePoint, 400) dc.SetRGB(myColor) dc.Fill() dc.SavePNG("out.png") }
https://pkg.go.dev/image#Rectangle
type Rectangle struct { Min, Max Point }
https://pkg.go.dev/image/color#RGBA
type RGBA struct { R, G, B, A uint8 }
https://pkg.go.dev/image#Point
type Point struct { X, Y int }
Drawing arguments are not coherent with the standard image library. for example I think it should be like this. Not (x, y , v , v);
https://pkg.go.dev/image#Rectangle
https://pkg.go.dev/image/color#RGBA
https://pkg.go.dev/image#Point