waitNoEvents waits for all events to be handled and does any rendering of the body necessary.
()
| 67 | // waitNoEvents waits for all events to be handled and does any rendering |
| 68 | // of the body necessary. |
| 69 | func (b *Body) waitNoEvents() { |
| 70 | rw := b.Scene.RenderWindow() |
| 71 | rw.noEventsChan = make(chan struct{}) |
| 72 | <-rw.noEventsChan |
| 73 | rw.noEventsChan = nil |
| 74 | |
| 75 | b.AsyncLock() |
| 76 | b.doNeedsRender() |
| 77 | b.AsyncUnlock() |
| 78 | } |
| 79 | |
| 80 | // assertPixels asserts that [Scene.Pixels] is equivalent |
| 81 | // to the image stored at the given filename in the testdata directory, |
no test coverage detected