Thumbnail the thumbnail for the Scatter, implementing the plot.Thumbnailer interface.
(plt *plot.Plot)
| 79 | // Thumbnail the thumbnail for the Scatter, |
| 80 | // implementing the plot.Thumbnailer interface. |
| 81 | func (pts *Scatter) Thumbnail(plt *plot.Plot) { |
| 82 | if !pts.LineStyle.SetStroke(plt) { |
| 83 | return |
| 84 | } |
| 85 | pc := plt.Paint |
| 86 | pts.PointSize.ToDots(&pc.UnitContext) |
| 87 | pc.FillStyle.Color = pts.LineStyle.Color |
| 88 | ptb := pc.Bounds |
| 89 | midX := 0.5 * float32(ptb.Min.X+ptb.Max.X) |
| 90 | midY := 0.5 * float32(ptb.Min.Y+ptb.Max.Y) |
| 91 | |
| 92 | DrawShape(pc, math32.Vec2(midX, midY), pts.PointSize.Dots, pts.PointShape) |
| 93 | } |