Skip to content
Snippets Groups Projects
Commit 3ffbbb9c authored by faiface's avatar faiface
Browse files

add examples on LineHeight and TabWidth to Text doc

parent 863e1e2f
No related branches found
No related tags found
No related merge requests found
......@@ -206,11 +206,17 @@ func (txt *Text) Color(c color.Color) {
// LineHeight sets the vertical distance between two lines of text. This does not affect any
// previously written text.
//
// Example:
// txt.LineHeight(1.5 * txt.Atlas().LineHeight())
func (txt *Text) LineHeight(height float64) {
txt.lineHeight = height
}
// TabWidth sets the horizontal tab width. Tab characters will align to the multiples of this width.
//
// Example:
// txt.TabWidth(8 * txt.Atlas().Glyph(' ').Advance)
func (txt *Text) TabWidth(width float64) {
txt.tabWidth = width
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment