Renderer.readPixels - multiple declarations

Function Renderer.readPixels

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

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

Parameters

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

Returns

dsdl.Surface copy of the renderer's entire target

Throws

dsdl.SDLException if pixels failed to be read

Function Renderer.readPixels

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

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

Parameters

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

Returns

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

Throws

dsdl.SDLException if pixels failed to be read