entryHeight returns the height of the tallest legend entry text.
()
| 173 | // entryHeight returns the height of the tallest legend |
| 174 | // entry text. |
| 175 | func (l *Legend) entryHeight() (height vg.Length) { |
| 176 | for _, e := range l.entries { |
| 177 | if h := l.TextStyle.Rectangle(e.text).Max.Y; h > height { |
| 178 | height = h |
| 179 | } |
| 180 | } |
| 181 | return |
| 182 | } |
| 183 | |
| 184 | // Add adds an entry to the legend with the given name. |
| 185 | // The entry's thumbnail is drawn as the composite of all of the |