Documentation
¶
Index ¶
- func DrawBox(layer *canvas.Layer, startX, startY, endX, endY int, style tcell.Style)
- func DrawHLine(layer *canvas.Layer, x, y, len int, style tcell.Style)
- func DrawText(layer *canvas.Layer, x, y int, text string, style tcell.Style)
- func DrawVLine(layer *canvas.Layer, x, y, len int, style tcell.Style)
- func DrawWrappedText(layer *canvas.Layer, minX, minY, maxX, maxY int, text string, ...)
- func Fill(layer *canvas.Layer, char rune, style tcell.Style)
- func Paint(layer *canvas.Layer, startX, startY, endX, endY int, char rune, ...)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DrawText ¶
DrawText draws text to the x y coords, automatically allocating enough space for double width chars.
func DrawWrappedText ¶
func DrawWrappedText(layer *canvas.Layer, minX, minY, maxX, maxY int, text string, style tcell.Style)
DrawWrappedText will print text to the screen, wrapping where possible to stay inside the bounds supplied in the paramters, and without overstepping the bounds of the screen.
func Fill ¶
Fill covers the entire layer with the specified rune.
Because runes can be either 1 or 2 spaces wide when painted on the screen, the method first checks to see how many cells should be advanced in the x axis each call to SetContent before it starts painting. If it turns out that it's impossible to paint the requested rune in the remaining area, a blank space is painted instead.
func Paint ¶
Paint covers the rectangle region specified by the two coord pairs with the supplied rune.
Because runes can be either 1 or 2 spaces wide when painted on the screen, the method first checks to see how many cells should be advanced in the x axis each call to SetContent before it starts painting. If it turns out that it's impossible to paint the requested rune in the remaining area, a blank space is painted instead.
Types ¶
This section is empty.