SDL Rendering.
More...
#include <SDLLayer.hpp>
|
| | SDLLayer () |
| | Initialize SDL Window and Renderer.
|
| |
| | ~SDLLayer () |
| | Destroy SDL Window and Renderer.
|
| |
| SDL_Renderer * | GetRenderer () const |
| | Get the Renderer object.
|
| |
| SDL_Window * | GetWindow () const |
| | Get the Window object.
|
| |
| void | DrawRectangle (const int x, const int y, const int width, const int height, const SDL_Color color) |
| | Draw a rectangle at the given position with the given width, height, and color.
|
| |
| void | DrawTexture (SDL_Texture *const texture, const float x, const float y, const float width, const float height) |
| | Draw a texture at the given position with the given width and height.
|
| |
| void | DrawTextureSample (SDL_Texture *const texture, const float x, const float y, const float width, const float height, const float sampleX, const float sampleY, const float sampleWidth, const float sampleHeight) |
| | Draw a texture taken from the sample at a given position with the given width, height.
|
| |
◆ SDLLayer()
Initialize SDL Window and Renderer.
◆ ~SDLLayer()
Destroy SDL Window and Renderer.
◆ DrawRectangle()
| void SDLLayer::DrawRectangle |
( |
const int | x, |
|
|
const int | y, |
|
|
const int | width, |
|
|
const int | height, |
|
|
const SDL_Color | color ) |
|
inline |
Draw a rectangle at the given position with the given width, height, and color.
- Parameters
-
◆ DrawTexture()
| void SDLLayer::DrawTexture |
( |
SDL_Texture *const | texture, |
|
|
const float | x, |
|
|
const float | y, |
|
|
const float | width, |
|
|
const float | height ) |
|
inline |
Draw a texture at the given position with the given width and height.
- Parameters
-
◆ DrawTextureSample()
| void SDLLayer::DrawTextureSample |
( |
SDL_Texture *const | texture, |
|
|
const float | x, |
|
|
const float | y, |
|
|
const float | width, |
|
|
const float | height, |
|
|
const float | sampleX, |
|
|
const float | sampleY, |
|
|
const float | sampleWidth, |
|
|
const float | sampleHeight ) |
|
inline |
Draw a texture taken from the sample at a given position with the given width, height.
- Parameters
-
| texture | |
| x | |
| y | |
| width | |
| height | |
| sampleX | |
| sampleY | |
| sampleWidth | |
| sampleHeight | |
◆ GetRenderer()
| SDL_Renderer * SDLLayer::GetRenderer |
( |
| ) |
const |
|
inline |
Get the Renderer object.
- Returns
- SDL_Renderer*
◆ GetWindow()
| SDL_Window * SDLLayer::GetWindow |
( |
| ) |
const |
|
inline |
Get the Window object.
- Returns
- SDL_Window*
The documentation for this class was generated from the following file: