Renderer.readPixels - multiple declarations

Function Renderer.readPixels

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

Surface readPixels (
  const(PixelFormat) format = _multiton()
) @trusted const;

Parameters

NameDescription
format requested dsdl2.PixelFormat of the returned dsdl2.Surface

Returns

dsdl2.Surface copy of the renderer's entire target

Throws

dsdl2.SDLException if pixels failed to be read

Function Renderer.readPixels

Wraps SDL_RenderReadPixels which makes a dsdl2.Surface from a specified dsdl2.Rect boundary at the renderer's target

Surface readPixels (
  Rect rect,
  const(PixelFormat) format = _multiton()
) @trusted const;

Parameters

NameDescription
rect dsdl2.Rect boundary to be read and copied
format requested dsdl2.PixelFormat of the returned dsdl2.Surface

Returns

dsdl2.Surface copy of the specified rectangle boundary in the renderer's target

Throws

dsdl2.SDLException if pixels failed to be read