From 3ffbbb9cda0ea39ae529b678ce7fcae02688378a Mon Sep 17 00:00:00 2001 From: faiface Date: Tue, 9 May 2017 16:40:44 +0200 Subject: [PATCH] add examples on LineHeight and TabWidth to Text doc --- text/text.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/text/text.go b/text/text.go index e01356e..9596bc6 100644 --- a/text/text.go +++ b/text/text.go @@ -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 }