gfm



class  SDL2Renderer;

SDL Renderer wrapper.


this(SDL2Window window, int flags = 0);

Creates a SDL renderer which targets a window.

See Also
http://wiki.libsdl.org/SDL_CreateRenderer
Throws
SDL2Exception on error.

this(SDL2Surface surface);

Create a software renderer which targets a surface.

See Also
http://wiki.libsdl.org/SDL_CreateSoftwareRenderer
Throws
SDL2Exception on error.

void  clear();

Clear the current rendering target with the drawing color.

See Also
http://wiki.libsdl.org/SDL_RenderClear
Throws
SDL2Exception on error.

void  present();

Update the screen with rendering performed.

See Also
http://wiki.libsdl.org/SDL_RenderPresent

void  setColor(int r, int g, int b, int a = 255);

Sets the color used for drawing operations.

See Also
http://wiki.libsdl.org/SDL_SetRenderDrawColor
Throws
SDL2Exception on error.

void  setViewport(int x, int y, int w, int h);

Sets the window drawing area.

See Also
http://wiki.libsdl.org/SDL_RenderSetViewport
Throws
SDL2Exception on error.

void  setViewportFull();

Sets the whole window as drawing area.

See Also
http://wiki.libsdl.org/SDL_RenderSetViewport
Throws
SDL2Exception on error.

void  setScale(float x, float y);

Sets the scale of the renderer.

See Also
http://wiki.libsdl.org/SDL_RenderSetScale
Throws
SDL2Exception on error.

void  setLogicalSize(int w, int h);

Sets a device independent resolution of the renderer.

See Also
http://wiki.libsdl.org/SDL_RenderSetLogicalSize
Throws
SDL2Exception on error.

void  setBlend(int blendMode);

Sets SDL blend mode.

See Also
http://wiki.libsdl.org/SDL_SetRenderDrawBlendMode
Throws
SDL2Exception on error.

void  drawLine(int x1, int y1, int x2, int y2);

Draw a line.

See Also
http://wiki.libsdl.org/SDL_RenderDrawLine
Throws
SDL2Exception on error.

void  drawLines(SDL_Point[] points);

Draw several lines at once.

See Also
http://wiki.libsdl.org/SDL_RenderDrawLines
Throws
SDL2Exception on error.

void  drawPoint(int x, int y);

Draw a point.

See Also
http://wiki.libsdl.org/SDL_RenderDrawPoint
Throws
SDL2Exception on error.

void  drawPoints(SDL_Point[] points);

Draw several point at once.

See Also
http://wiki.libsdl.org/SDL_RenderDrawPoints
Throws
SDL2Exception on error.

void  drawRect(int x, int y, int width, int height);

Draw a rectangle outline.

See Also
http://wiki.libsdl.org/SDL_RenderDrawRect
Throws
SDL2Exception on error.

void  fillRect(int x, int y, int width, int height);

Draw a filled rectangle.

See Also
http://wiki.libsdl.org/SDL_RenderFillRect
Throws
SDL2Exception on error.

void  copy(SDL2Texture texture, SDL_Rect srcRect, SDL_Rect dstRect);

Blit a rectangle from a texture.

See Also
http://wiki.libsdl.org/SDL_RenderCopy
Throws
SDL2Exception on error.

void  copy(SDL2Texture texture, int x, int y);

Draws a whole texture.

See Also
http://wiki.libsdl.org/SDL_RenderCopy
Throws
SDL2Exception on error.

void  copyEx(SDL2Texture texture, SDL_Rect srcRect, SDL_Rect dstRect, double rotangle, SDL_Point* rotcenter, SDL_RendererFlip flip);

Blits a rectangle from a texture and apply rotation/reflection.

See Also
http://wiki.libsdl.org/SDL_RenderCopyEx
Throws
SDL2Exception on error.

void  setRenderTarget(SDL2Texture texture);

Set a texture as the current rendering target.

See Also
http://wiki.libsdl.org/SDL_SetRenderTarget
Throws
SDL2Exception on error.

SDL2RendererInfo  info();

Returns
Renderer information.
See Also
http://wiki.libsdl.org/SDL_GetRendererInfo
Throws
SDL2Exception on error.

SDL_Renderer*  handle();

Returns
SDL  handle.

SDL Renderer information.


const(char)[]  name();

Returns
Renderer  name.

bool  isSoftware();

Returns
true if this renderer is software.

bool  isAccelerated();

Returns
true if this renderer is accelerated.

Returns
true if this renderer can render to a texture.

bool  isVsyncEnabled();

Returns
true if this renderer support vertical synchronization.

int  maxTextureWidth();

Returns
the maximum supported texture width

Returns
the maximum supported texture height

string  toString();

Returns
Pretty string describing the renderer.