Ejemplo n.º 1
0
func (d *Diamonds) render(g *dwg.GraphicContext, h, v *vec.Vec, data chan Occur) {
	for step := range data {
		g.Save()
		g.Rotate(step.Arc)
		g.Translate(90, 0)
		d.drawDiamond(
			g,
			h.Scale(step.Scale, step.Scale),
			v.Scale(step.Scale, step.Scale),
			RgbaColor(150, 140+step.N, 0, step.Opacity),
		)
		g.Restore()
	}
}