Renderer.viewport - multiple declarations

Function Renderer.viewport

Wraps SDL_RenderGetViewport which gets the dsdl2.Rect viewport of the renderer

Rect viewport() @property @trusted const;

Returns

viewport dsdl2.Rect of the renderer

Function Renderer.viewport

Wraps SDL_RenderSetViewport which sets the dsdl2.Rect viewport of the dsdl2.Renderer

void viewport (
  Rect newViewport
) @property @trusted;

Parameters

NameDescription
newViewport dsdl2.Rect to set as the rectangle viewport

Throws

dsdl2.SDLException if failed to set the renderer's viewport

Function Renderer.viewport

Acts as SDL_RenderSetViewport(renderer, NULL) which removes the dsdl2.Rect viewport of the dsdl2.Renderer

void viewport (
  typeof(null) _
) @property @trusted;

Throws

dsdl2.SDLException if failed to set the renderer's viewport

Function Renderer.viewport

Wraps SDL_RenderSetViewport which sets or removes the viewport dsdl2.Rect of the dsdl2.Renderer

void viewport (
  std.typecons.Nullable!(dsdl2.rect.Rect) newViewport
) @property @trusted;

Parameters

NameDescription
newViewport dsdl2.Rect to set as the rectangle viewport; null to remove the rectangle viewport

Throws

dsdl2.SDLException if failed to set the renderer's viewport