SDL2Renderer

SDL Renderer wrapper.

Constructors

this
this(SDL2Window window, int flags)

Creates a SDL renderer which targets a window.

this
this(SDL2Surface surface)

Create a software renderer which targets a surface.

Destructor

~this
~this()

Releases the SDL ressource.

Members

Functions

clear
void clear()

Clear the current rendering target with the drawing color.

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

Blit a rectangle from a texture.

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

Draws a whole texture.

copyEx
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.

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

Draw a line.

drawLines
void drawLines(SDL_Point[] points)

Draw several lines at once.

drawPoint
void drawPoint(int x, int y)

Draw a point.

drawPoints
void drawPoints(SDL_Point[] points)

Draw several point at once.

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

Draw a rectangle outline.

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

Draw a filled rectangle.

handle
SDL_Renderer* handle()
info
SDL2RendererInfo info()
present
void present()

Update the screen with rendering performed.

setBlend
void setBlend(int blendMode)

Sets SDL blend mode.

setColor
void setColor(int r, int g, int b, int a)

Sets the color used for drawing operations.

setLogicalSize
void setLogicalSize(int w, int h)

Sets a device independent resolution of the renderer.

setRenderTarget
void setRenderTarget(SDL2Texture texture)

Set a texture as the current rendering target.

setScale
void setScale(float x, float y)

Sets the scale of the renderer.

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

Sets the window drawing area.

setViewportFull
void setViewportFull()

Sets the whole window as drawing area.

Variables

_info
SDL2RendererInfo _info;
Undocumented in source.
_renderer
SDL_Renderer* _renderer;
Undocumented in source.
_sdl2
SDL2 _sdl2;
Undocumented in source.

Meta