Beispiel #1
0
func flushFunc(ctxt draw.Window) func(r image.Rectangle) {
	if fctxt, ok := ctxt.(RectFlusherWindow); ok {
		return func(r image.Rectangle) {
			fctxt.FlushImageRect(r)
		}
	}
	return func(_ image.Rectangle) {
		ctxt.FlushImage()
	}
}
Beispiel #2
0
func goplot(w draw.Window, ch chan []Point, wait chan int) {
	s := w.Screen()

	for {
		v := <-ch
		plot(s, v)
		w.FlushImage()
		if *waitForGraphics {
			wait <- 1
		}
	}
}
Beispiel #3
0
func inlineplot(w draw.Window, v []Point) {
	s := w.Screen()

	plot(s, v)
	w.FlushImage()
}