The Canvas widget provides methods to draw primitive shapes using image.Point coordinates and termui.Color values:
SetPoint(p image.Point, color Color): Sets a single pixel at the specified point p with the given color.SetLine(p0, p1 image.Point, color Color): Draws a line between points p0 and p1 using the specified color.
Note that these coordinates are relative to the internal drawille.Canvas coordinate system. When the widget's Draw(buf *Buffer) method is called, it clips the drawing to the widget's Rectangle and renders it to the terminal buffer.
// Drawing a single point
canvas.SetPoint(image.Point{X: 10, Y: 10}, termui.ColorBlue)
// Drawing a line
canvas.SetLine(image.Point{X: 0, Y: 0}, image.Point{X: 20, Y: 20}, termui.ColorRed)