|
Plutonium framework API 1.0.0
Easy-to-use, SDL2-based UI framework for Nintendo Switch homebrew
|
Main rendering header. More...
#include <pu/ui/ui_Types.hpp>#include <pu/ui/render/render_SDL2.hpp>#include <pu/ttf/ttf_Font.hpp>#include <vector>Go to the source code of this file.
Classes | |
| struct | pu::ui::render::RendererInitOptions |
| Represents the options for initializing the Renderer. More... | |
| struct | pu::ui::render::TextureRenderOptions |
| Represents the options for rendering a texture. More... | |
| class | pu::ui::render::Renderer |
| The main class dealing with rendering. More... | |
Namespaces | |
| namespace | pu |
| namespace | pu::ui |
| namespace | pu::ui::render |
Functions | |
| sdl2::Renderer | pu::ui::render::GetMainRenderer () |
| Gets the underlying SDL2 renderer. | |
| sdl2::Window | pu::ui::render::GetMainWindow () |
| Gets the underlying SDL2 window. | |
| sdl2::Surface | pu::ui::render::GetMainSurface () |
| Gets the underlying SDL2 surface. | |
| std::pair< u32, u32 > | pu::ui::render::GetDimensions () |
| Gets the underlying SDL2 window width/height. | |
| bool | pu::ui::render::AddFont (const std::string &font_name, std::shared_ptr< ttf::Font > &font) |
| Creates a font to the internal font list. | |
| bool | pu::ui::render::LoadSingleSharedFontInFont (std::shared_ptr< ttf::Font > &font, const PlSharedFontType type) |
| Loads a system shared font (pl:) in a font object. | |
| bool | pu::ui::render::LoadAllSharedFontsInFont (std::shared_ptr< ttf::Font > &font) |
| Loads all system shared fonts (pl:) in a font object. | |
| void | pu::ui::render::AddDefaultFont (std::shared_ptr< ttf::Font > &font) |
| Adds a font object as a default font to the internal font list. | |
| bool | pu::ui::render::GetTextDimensions (const std::string &font_name, const std::string &text, i32 &out_width, i32 &out_height) |
| Gets the resulting text size for rendering a text with the specified font. | |
| i32 | pu::ui::render::GetTextWidth (const std::string &font_name, const std::string &text) |
| Gets the resulting text width for rendering a text with the specified font. | |
| i32 | pu::ui::render::GetTextHeight (const std::string &font_name, const std::string &text) |
| Gets the resulting text height for rendering a text with the specified font. | |
| sdl2::Texture | pu::ui::render::RenderText (const std::string &font_name, const std::string &text, const Color clr, const u32 max_width=0, const u32 max_height=0) |
| Renders a text to a texture. | |
Variables | |
| constexpr u32 | pu::ui::render::BaseScreenWidth = 1280 |
| constexpr u32 | pu::ui::render::BaseScreenHeight = 720 |
| constexpr u32 | pu::ui::render::ScreenWidth = 1920 |
| constexpr u32 | pu::ui::render::ScreenHeight = 1080 |
| constexpr double | pu::ui::render::ScreenFactor = (double)ScreenWidth / (double)BaseScreenWidth |
| constexpr u32 | pu::ui::render::ImgAllFlags = IMG_INIT_PNG | IMG_INIT_JPG | IMG_INIT_WEBP |
| constexpr u32 | pu::ui::render::RendererSoftwareFlags = SDL_RENDERER_SOFTWARE |
| constexpr u32 | pu::ui::render::RendererHardwareFlags = SDL_RENDERER_PRESENTVSYNC | SDL_RENDERER_ACCELERATED |
Main rendering header.
Plutonium library