Thumbnail fulfills the plot.Thumbnailer interface.
(c *draw.Canvas)
| 196 | |
| 197 | // Thumbnail fulfills the plot.Thumbnailer interface. |
| 198 | func (b *BarChart) Thumbnail(c *draw.Canvas) { |
| 199 | pts := []vg.Point{ |
| 200 | {X: c.Min.X, Y: c.Min.Y}, |
| 201 | {X: c.Min.X, Y: c.Max.Y}, |
| 202 | {X: c.Max.X, Y: c.Max.Y}, |
| 203 | {X: c.Max.X, Y: c.Min.Y}, |
| 204 | } |
| 205 | poly := c.ClipPolygonY(pts) |
| 206 | c.FillPolygon(b.Color, poly) |
| 207 | |
| 208 | pts = append(pts, vg.Point{X: c.Min.X, Y: c.Min.Y}) |
| 209 | outline := c.ClipLinesY(pts) |
| 210 | c.StrokeLines(b.LineStyle, outline...) |
| 211 | } |
nothing calls this directly
no test coverage detected