lxgui
Loading...
Searching...
No Matches
gui_render_target.hpp
1#ifndef LXGUI_GUI_RENDER_TARGET_HPP
2#define LXGUI_GUI_RENDER_TARGET_HPP
3
4#include "lxgui/gui_bounds2.hpp"
5#include "lxgui/gui_color.hpp"
6#include "lxgui/lxgui.hpp"
7#include "lxgui/utils.hpp"
8
9namespace lxgui::gui {
10
17public:
19 render_target() = default;
20
22 virtual ~render_target() = default;
23
25 render_target(const render_target&) = delete;
26
29
32
35
37 virtual void begin() = 0;
38
40 virtual void end() = 0;
41
46 virtual void clear(const color& c) = 0;
47
52 virtual bounds2f get_rect() const = 0;
53
59 virtual bool set_dimensions(const vector2ui& dimensions) = 0;
60
69 virtual vector2ui get_canvas_dimensions() const = 0;
70
77 virtual void save_to_file(std::string filename) const = 0;
78};
79
80} // namespace lxgui::gui
81
82#endif
Holds a single color (float RGBA, 128 bits)
Definition gui_color.hpp:13
A place to render things (the screen, a texture, ...)
virtual ~render_target()=default
Destructor.
virtual void clear(const color &c)=0
Clears the content of this render_target.
render_target & operator=(const render_target &)=delete
Non-copiable.
render_target(const render_target &)=delete
Non-copiable.
render_target & operator=(render_target &&)=delete
Non-movable.
virtual vector2ui get_canvas_dimensions() const =0
Returns this render target's canvas dimension.
virtual bool set_dimensions(const vector2ui &dimensions)=0
Sets this render target's dimensions.
virtual void end()=0
Ends rendering on this target.
virtual void begin()=0
Begins rendering on this target.
render_target()=default
Constructor.
virtual bounds2f get_rect() const =0
Returns this render target's pixel rect.
virtual void save_to_file(std::string filename) const =0
Saves the content of this render target into a file.
render_target(render_target &&)=delete
Non-movable.