Fyne GoLang GUI Course Canvas Line – Tutorial 11

Class 11 fyne GoLang GUI Canvas Line

package main
// importing fyne
import (
"image/color"
"fyne.io/fyne/v2"
"fyne.io/fyne/v2/app"
"fyne.io/fyne/v2/canvas"
)
func main() {
// creating new app
a := app.New()
// creating new window and title
w := a.NewWindow("Line : Canvas tutorial")
// resizing my windows
w.Resize(fyne.NewSize(400, 400))
// creating line
lineX := canvas.NewLine(color.Black)
lineX.StrokeColor = color.NRGBA{R: 0, G: 255, B: 0, A: 255}
lineX.StrokeWidth = 12.0
//setup content
w.SetContent(lineX)
// Running app
w.ShowAndRun()
}
Download Code

 

Tony BB
 

TonyBB is a Coach , marketer, hypnotist and a founder of RSKVF Production who specializes in providing simple, affordable, and easy to use solutions for Life.

Click Here to Leave a Comment Below 0 comments

Leave a Reply: