Answer the question
In order to leave comments, you need to log in
How to draw a dot on fyne (go) canvas?
application on go. fyne.io
is used as GUI
package main
import (
"image/color"
"fyne.io/fyne/v2/app"
"fyne.io/fyne/v2/canvas"
)
func main() {
a := app.New()
w := a.NewWindow("The dots")
cnvs := w.Canvas()
red := color.NRGBA{255, 0, 0, 128}
// blue := color.NRGBA{0, 0, 255, 128}
rect := canvas.NewRectangle(red)
cnvs.SetContent(rect)
// Здесь хочется перекрасить пиксель в координатах х=50; у=80 в синий цвет
// cnvs.SetPixel(blue, 50, 80)
w.ShowAndRun()
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question