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.
Clear the current rendering target with the drawing color.
- See Also
- http://wiki.libsdl.org/SDL_RenderClear
- Throws
- SDL2Exception on error.
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.
Sets the window drawing area.
- See Also
- http://wiki.libsdl.org/SDL_RenderSetViewport
- Throws
- SDL2Exception on error.
Sets the whole window as drawing area.
- See Also
- http://wiki.libsdl.org/SDL_RenderSetViewport
- Throws
- SDL2Exception on error.
Sets the scale of the renderer.
- See Also
- http://wiki.libsdl.org/SDL_RenderSetScale
- Throws
- SDL2Exception on error.
Sets a device independent resolution of the renderer.
- See Also
- http://wiki.libsdl.org/SDL_RenderSetLogicalSize
- Throws
- SDL2Exception on error.
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.
Draw several lines at once.
- See Also
- http://wiki.libsdl.org/SDL_RenderDrawLines
- Throws
- SDL2Exception on error.
Draw a point.
- See Also
- http://wiki.libsdl.org/SDL_RenderDrawPoint
- Throws
- SDL2Exception on error.
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.
Set a texture as the current rendering target.
- See Also
- http://wiki.libsdl.org/SDL_SetRenderTarget
- Throws
- SDL2Exception on error.
- Returns
- Renderer information.
- See Also
- http://wiki.libsdl.org/SDL_GetRendererInfo
- Throws
- SDL2Exception on error.
SDL Renderer information.
- Returns
- true if this renderer is software.
- Returns
- true if this renderer is accelerated.
- Returns
- true if this renderer can render to a texture.
- Returns
- true if this renderer support vertical synchronization.
- Returns
- the maximum supported texture width
- Returns
- the maximum supported texture height
- Returns
- Pretty string describing the renderer.