Renderer.readPixels

Wraps SDL_RenderReadPixels which makes a dsdl2.Surface from the renderer's entire target

  1. Surface readPixels(PixelFormat format)
    class Renderer
    const @trusted
    readPixels
  2. Surface readPixels(Rect rect, PixelFormat format)

Parameters

format PixelFormat

requested dsdl2.PixelFormat of the returned dsdl2.Surface

Return Value

Type: Surface

dsdl2.Surface copy of the renderer's entire target

Throws

dsdl2.SDLException if pixels failed to be read

Meta