(hdlr text.Handler)
| 82 | } |
| 83 | |
| 84 | func newLegend(hdlr text.Handler) Legend { |
| 85 | return Legend{ |
| 86 | YPosition: draw.PosBottom, |
| 87 | ThumbnailWidth: vg.Points(20), |
| 88 | TextStyle: text.Style{ |
| 89 | Font: font.From(DefaultFont, 12), |
| 90 | Handler: hdlr, |
| 91 | }, |
| 92 | } |
| 93 | } |
| 94 | |
| 95 | // Draw draws the legend to the given draw.Canvas. |
| 96 | func (l *Legend) Draw(c draw.Canvas) { |