A single texture holding multiple materials for efficient rendering This is an abstract class that must be implemented and created by the corresponding gui::renderer.
More...
#include <gui_sdl_atlas.hpp>
|
| atlas_page (renderer &rdr, material::filter filt) |
| Constructor.
|
|
| ~atlas_page () override |
| Destructor.
|
|
std::shared_ptr< material > | fetch_material (const std::string &file_name) const |
| Find a material in this page (nullptr if not found).
|
|
std::shared_ptr< material > | add_material (const std::string &file_name, const material &mat) |
| Creates a new material from a texture file.
|
|
std::shared_ptr< font > | fetch_font (const std::string &font_name) const |
| Find a font in this page (nullptr if not found).
|
|
bool | add_font (const std::string &font_name, std::shared_ptr< gui::font > fnt) |
| Creates a new font from a texture file.
|
|
bool | empty () const |
| Checks if this page is empty (contains no materials).
|
|
A single texture holding multiple materials for efficient rendering This is an abstract class that must be implemented and created by the corresponding gui::renderer.
Definition at line 26 of file gui_sdl_atlas.hpp.
◆ atlas_page()
◆ ~atlas_page()
lxgui::gui::sdl::atlas_page::~atlas_page |
( |
| ) |
|
|
overridevirtual |
◆ add_font()
bool lxgui::gui::atlas_page::add_font |
( |
const std::string & |
font_name, |
|
|
std::shared_ptr< gui::font > |
fnt |
|
) |
| |
|
inherited |
Creates a new font from a texture file.
- Parameters
-
font_name | The name of the file |
fnt | The font to add to this page |
- Returns
- The new font (or nullptr if the font could not fit)
Definition at line 51 of file gui_atlas.cpp.
◆ add_material()
std::shared_ptr< gui::material > lxgui::gui::atlas_page::add_material |
( |
const std::string & |
file_name, |
|
|
const material & |
mat |
|
) |
| |
|
inherited |
Creates a new material from a texture file.
- Parameters
-
file_name | The name of the file |
mat | The material to add to this page |
- Returns
- The new material (or nullptr if the material could not fit)
Definition at line 25 of file gui_atlas.cpp.
◆ add_material_()
Adds a new material to this page, at the provided location.
- Parameters
-
mat | The material to add |
location | The position at which to insert this material |
- Returns
- A new material pointing to inside this page
Implements lxgui::gui::atlas_page.
◆ empty()
bool lxgui::gui::atlas_page::empty |
( |
| ) |
const |
|
inherited |
Checks if this page is empty (contains no materials).
- Returns
- 'true' if the page is empty, 'false' otherwise
Definition at line 72 of file gui_atlas.cpp.
◆ fetch_font()
std::shared_ptr< font > lxgui::gui::atlas_page::fetch_font |
( |
const std::string & |
font_name | ) |
const |
|
inherited |
Find a font in this page (nullptr if not found).
- Parameters
-
font_name | The name+size of the font |
- Returns
- The font (nullptr if not found)
Definition at line 41 of file gui_atlas.cpp.
◆ fetch_material()
std::shared_ptr< material > lxgui::gui::atlas_page::fetch_material |
( |
const std::string & |
file_name | ) |
const |
|
inherited |
Find a material in this page (nullptr if not found).
- Parameters
-
file_name | The name of the file |
- Returns
- The material (nullptr if not found)
Definition at line 14 of file gui_atlas.cpp.
◆ get_height_()
float lxgui::gui::sdl::atlas_page::get_height_ |
( |
| ) |
const |
|
overrideprotectedvirtual |
Return the height of this page (in pixels).
- Returns
- The height of this page (in pixels)
Implements lxgui::gui::atlas_page.
◆ get_width_()
float lxgui::gui::sdl::atlas_page::get_width_ |
( |
| ) |
const |
|
overrideprotectedvirtual |
Return the width of this page (in pixels).
- Returns
- The width of this page (in pixels)
Implements lxgui::gui::atlas_page.
◆ filter_
The documentation for this class was generated from the following file: