|
Rose
|
Class and functions that are used to access the SDL2 api. More...
Classes | |
| class | ClipRectangleGuard |
| Store the current clip rectangle replacing it with a new clip rectangle. More... | |
| class | DrawColorGuard |
| Store the current draw color replacing it with a new draw color. More... | |
| class | DrawColorGuardException |
| Thrown by DrawColorGuard on errors. More... | |
| class | GradientScale |
| A type of texture that if stretch across a destination Rectangle in rendering, will create a gradient coloring. More... | |
| class | GradientTexture |
| A gradient rendering kernel. More... | |
| class | PixelFormat |
| An encapsulation of an SDL_PixelFormat. More... | |
| class | PixelFormatDestroy |
| A functor to destroy an SDL_PixelFormat in a std::unique_ptr (rose::sdl::PixelFormat) More... | |
| class | Renderer |
| Written as a workaround for an issue in the SDL2 Library. More... | |
| struct | RenderFlip |
| A Widget manipulator to indicate if and how rendering a texture should be flipped. More... | |
| class | RenderTargetGuard |
| Store the current render target replacing it with a new render target. More... | |
| class | RenderTargetGuardException |
| Thrown by RenderTargetGuard on errors. More... | |
| class | Texture |
| An encapsulation of the SDL_Texture structure. More... | |
| class | TextureData |
| A Texture with associated meta data. More... | |
| class | TextureDestroy |
| A functor to destroy an SDL_Texture in a std::unique_ptr (rose::sdl::Texture) More... | |
| class | WindowDestroy |
| A functor to destroy an SDL_Window in a std::unique_ptr (rose::sdl::Window). More... | |
Typedefs | |
| using | Window = std::unique_ptr< SDL_Window, WindowDestroy > |
| An SDL_Window unique pointer. | |
Functions | |
| uint32_t | mapRGBA (SDL_PixelFormatEnum pixelFormat, const color::RGBA &color) |
| Map a color::RGBA to a uint32_t. More... | |
| uint32_t | mapRGBA (PixelFormat &pixelFormat, const color::RGBA &color) |
| Map a color::RGBA to a uint32_t. More... | |
| uint32_t | mapRGBA (SDL_PixelFormat *format, const color::RGBA &color) |
| Map a color::RGBA to a uint32_t. More... | |
| color::RGBA | getRGBA (PixelFormat &pixelFormat, uint32_t pixel) |
| color::RGBA | getRGBA (SDL_PixelFormat *format, uint32_t pixel) |
| TextureData | CreateTextureFromFile (Renderer &renderer, std::filesystem::path &filePath) |
| Create texture data from a file system path. More... | |
| template<typename String > | |
| TextureData | CreateTextureFromFile (Renderer &renderer, std::filesystem::path &dirPath, String fileName) |
| Create texture data from a file system path. More... | |
| template<typename Color > | |
| sdl::Texture | renderTextureBlended (sdl::Renderer &renderer, FontPointer &font, const std::string &text, const Color &color) |
| Render text to a Texture. More... | |
| template<typename Color > | |
| sdl::Texture | renderTextureBlendedUTF8 (sdl::Renderer &renderer, FontPointer &font, const std::string &text, const Color &color) |
| Render text to a Texture. More... | |
Class and functions that are used to access the SDL2 api.
| TextureData rose::sdl::CreateTextureFromFile | ( | Renderer & | renderer, |
| std::filesystem::path & | filePath | ||
| ) |
Create texture data from a file system path.
| renderer | The Renderer to use. |
| filePath | The std::filesystem::path pointing to the file to load. |
| TextureData rose::sdl::CreateTextureFromFile | ( | Renderer & | renderer, |
| std::filesystem::path & | dirPath, | ||
| String | fileName | ||
| ) |
Create texture data from a file system path.
| String | A type of a string like value. |
| renderer | The Renderer to use. |
| dirPath | The std::filesystem::path pointing to the director to load the file from. |
| fileName | The file name in a string like value. |
| uint32_t rose::sdl::mapRGBA | ( | SDL_PixelFormatEnum | pixelFormat, |
| const color::RGBA & | color | ||
| ) |
Map a color::RGBA to a uint32_t.
This function will allocate a PixelFormat, call mapRGBA(PixelFormat,color::RGBA), then destroy a PixelFormat.
| pixelFormat | The SDL PixelFormat defined constant. |
| color | The Colour to map. |
| uint32_t rose::sdl::mapRGBA | ( | PixelFormat & | pixelFormat, |
| const color::RGBA & | color | ||
| ) |
Map a color::RGBA to a uint32_t.
| pixelFormat | A reference to a PixelFormat. |
| color | The color to map. |
| uint32_t rose::sdl::mapRGBA | ( | SDL_PixelFormat * | format, |
| const color::RGBA & | color | ||
| ) |
Map a color::RGBA to a uint32_t.
| format | A pointer to an SDL_PixelFormat (from a Surface object for example). |
| color | The color::RGBA to map. |
|
inline |
|
inline |
1.8.13