Tryst::SDL::Renderer::Pixels
A snapshot of what was drawn, for tests and screenshots.
Reading pixels back stalls the GPU, so this is deliberately not something to do per frame - but it is the only way to assert that a draw call actually put the colour where it was asked to, which is worth a great deal in a suite that otherwise can only check that nothing crashed.
Constructors
Instance methods
The colour at a point. Raises rather than returning a wrong colour if the read fails.
height
Sourcerelease
@api private - Renderer#read_pixels frees this once the block it yielded to has finished.
width
Source